]> 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)
commit862d6da9fda08da61851f50627bae2e7a4a2060a
treecae7571656a85e8c76109813874fa4521fdd003b
parent24badf7957f81fe15ac82e462c953af0c853f72a
net/smc: fix shutdown in state SMC_LISTEN

Calling shutdown with SHUT_RD and SHUT_RDWR for a listening SMC socket
crashes, because
   commit 5811a700456f ("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: 5811a700456f ("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