]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: hold endpoint before calling cb in sctp_transport_lookup_process
authorXin Long <lucien.xin@gmail.com>
Fri, 31 Dec 2021 23:37:37 +0000 (18:37 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 2 Jan 2022 12:46:41 +0000 (12:46 +0000)
commit96dbee4bc3e36f1205a265b2aa05479d544d833d
treeb9773cb8cf506bcab4f94014afbb12becbe18e76
parent6ba473733fac986eba82635e7c1d631aa097ca7d
sctp: hold endpoint before calling cb in sctp_transport_lookup_process

The same fix in commit 37a40951dfd8 ("sctp: use call_rcu to free endpoint")
is also needed for dumping one asoc and sock after the lookup.

Fixes: 497999477ec2 ("sctp: ensure ep is not destroyed before doing the dump")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/sctp.h
net/sctp/diag.c
net/sctp/socket.c