]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/smc: transfer fasync_list in case of fallback
authorUrsula Braun <ubraun@linux.ibm.com>
Fri, 14 Feb 2020 07:58:59 +0000 (08:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Mar 2020 15:45:17 +0000 (16:45 +0100)
commit48b8949438afbf0779521f4f0df683d14a918525
treeed3f39d164c20f07c5461d300c914391dd3c4838
parenta469bab3386aebff33c59506f3a95e35b91118fd
net/smc: transfer fasync_list in case of fallback

commit 67f562e3e147750a02b2a91d21a163fc44a1d13e upstream.

SMC does not work together with FASTOPEN. If sendmsg() is called with
flag MSG_FASTOPEN in SMC_INIT state, the SMC-socket switches to
fallback mode. To handle the previous ioctl FIOASYNC call correctly
in this case, it is necessary to transfer the socket wait queue
fasync_list to the internal TCP socket.

Reported-by: syzbot+4b1fe8105f8044a26162@syzkaller.appspotmail.com
Fixes: ee9dfbef02d18 ("net/smc: handle sockopts forcing fallback")
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/smc/af_smc.c