summaryrefslogtreecommitdiff
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2018-01-15 12:01:36 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-31 14:55:55 +0300
commit2f056e7def4236bf5279da38410c93acee164d5a (patch)
treee8f6c9fa062142a2fe8c8dd3e26a10d01b5e394a /net/tipc/node.c
parent8e3534ea657e8e072e480b4a36c743458c5c852d (diff)
downloadlinux-2f056e7def4236bf5279da38410c93acee164d5a.tar.xz
sctp: return error if the asoc has been peeled off in sctp_wait_for_sndbuf
[ Upstream commit a0ff660058b88d12625a783ce9e5c1371c87951f ] After commit cea0cc80a677 ("sctp: use the right sk after waking up from wait_buf sleep"), it may change to lock another sk if the asoc has been peeled off in sctp_wait_for_sndbuf. However, the asoc's new sk could be already closed elsewhere, as it's in the sendmsg context of the old sk that can't avoid the new sk's closing. If the sk's last one refcnt is held by this asoc, later on after putting this asoc, the new sk will be freed, while under it's own lock. This patch is to revert that commit, but fix the old issue by returning error under the old sk's lock. Fixes: cea0cc80a677 ("sctp: use the right sk after waking up from wait_buf sleep") Reported-by: syzbot+ac6ea7baa4432811eb50@syzkaller.appspotmail.com Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/tipc/node.c')
0 files changed, 0 insertions, 0 deletions