]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: fix shutdown in state SMC_LISTEN
authorUrsula Braun <ubraun@linux.vnet.ibm.com>
Thu, 19 Apr 2018 13:56:40 +0000 (15:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Apr 2018 20:38:39 +0000 (16:38 -0400)
commitf3f8c3c13e851c36f6f0115da3b2de44b2c4fbe3
treecae7571656a85e8c76109813874fa4521fdd003b
parentd1a1c6c83976c33ffb0876e2b586f31b62d12963
net/smc: fix shutdown in state SMC_LISTEN

Calling shutdown with SHUT_RD and SHUT_RDWR for a listening SMC socket
crashes, because
   commit 6f0a6522a1b7 ("net/smc: release clcsock from tcp_listen_worker")
releases the internal clcsock in smc_close_active() and sets smc->clcsock
to NULL.
For SHUT_RD the smc_close_active() call is removed.
For SHUT_RDWR the kernel_sock_shutdown() call is omitted, since the
clcsock is already released.

Fixes: 6f0a6522a1b7 ("net/smc: release clcsock from tcp_listen_worker")
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/af_smc.c