Commit 070204a3 authored by Ursula Braun's avatar Ursula Braun Committed by David S. Miller
Browse files

net/smc: keep clcsock reference in smc_tcp_listen_work()

The internal CLC socket should exist till the SMC-socket is released.
Function tcp_listen_worker() releases the internal CLC socket of a
listen socket, if an smc_close_active() is called. This function
is called for the final release(), but it is called for shutdown
SHUT_RDWR as well. This opens a door for protection faults, if
socket calls using the internal CLC socket are called for a
shutdown listen socket.

With the changes of
commit 3d502067 ("net/smc: simplify wait when closing listen socket")
there is no need anymore to release the internal CLC socket in
function tcp_listen_worker((). It is sufficient to release it in

Fixes: 127f4970

 ("net/smc: release clcsock from tcp_listen_worker")
Signed-off-by: default avatarUrsula Braun <>
Reported-by: default avatar <>
Reported-by: default avatar <>
Reported-by: default avatar <>
Reported-by: default avatar <>
Signed-off-by: default avatarDavid S. Miller <>
parent 02a6efca
......@@ -978,10 +978,6 @@ static void smc_tcp_listen_work(struct work_struct *work)
if (lsmc->clcsock) {
lsmc->clcsock = NULL;
sock_put(&lsmc->sk); /* sock_hold in smc_listen */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment