]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Aug 2018 02:14:22 +0000 (19:14 -0700)
commit20af887737db6b4700acd2cd8511a8273b61effc
tree5cc5dccf2d25d7305186bbf5cf94e67563f8d9bf
parent66f2c9b58931c3823802062a2776430be50bb548
net/smc: no shutdown in state SMC_LISTEN

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>
net/smc/af_smc.c