Skip to content
Commit b355ca6a authored by Tony Lu's avatar Tony Lu Committed by Greg Kroah-Hartman
Browse files

net/smc: Fix sock leak when release after smc_shutdown()



[ Upstream commit 1a74e993 ]

Since commit e5d5aadc ("net/smc: fix sk_refcnt underflow on linkdown
and fallback"), for a fallback connection, __smc_release() does not call
sock_put() if its state is already SMC_CLOSED.

When calling smc_shutdown() after falling back, its state is set to
SMC_CLOSED but does not call sock_put(), so this patch calls it.

Reported-and-tested-by: default avatar <syzbot+6e29a053eb165bd50de5@syzkaller.appspotmail.com>
Fixes: e5d5aadc ("net/smc: fix sk_refcnt underflow on linkdown and fallback")
Signed-off-by: default avatarTony Lu <tonylu@linux.alibaba.com>
Acked-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8fe1bf23
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