]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/smc: no shutdown in state SMC_LISTEN
authorUrsula Braun <ubraun@linux.ibm.com>
Wed, 8 Aug 2018 12:13:19 +0000 (14:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:07:16 +0000 (13:07 +0200)
commit3cb744554f4d686fdf01dd24d6df57e0f260a96e
tree592c4b73c3a7368c549ac8bed3dec027058c2442
parent4713ad95833b593a50f7162e503c6c791dc050a9
net/smc: no shutdown in state SMC_LISTEN

commit caa21e19e08d7a1445116a93f7ab4e187ebbbadb upstream.

Invoking shutdown for a socket in state SMC_LISTEN does not make
sense. Nevertheless programs like syzbot fuzzing the kernel may
try to do this. For SMC this means a socket refcounting problem.
This patch makes sure a shutdown call for an SMC socket in state
SMC_LISTEN simply returns with -ENOTCONN.

Signed-off-by: Ursula Braun <ubraun@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