]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/smc: put sk reference if close work was canceled
authorD. Wythe <alibuda@linux.alibaba.com>
Fri, 3 Nov 2023 06:07:40 +0000 (14:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:08:29 +0000 (11:08 +0100)
commit5ea06a23f8f47e5bfb32cba391d6e7609275f27c
tree56d296cdcc17a7bbe84d83a2b80513c280ab6254
parent884606f8283c936c177423d9bf5f52244b06cef3
net/smc: put sk reference if close work was canceled

[ Upstream commit aa96fbd6d78d9770323b21e2c92bd38821be8852 ]

Note that we always hold a reference to sock when attempting
to submit close_work. Therefore, if we have successfully
canceled close_work from pending, we MUST release that reference
to avoid potential leaks.

Fixes: 42bfba9eaa33 ("net/smc: immediate termination for SMCD link groups")
Signed-off-by: D. Wythe <alibuda@linux.alibaba.com>
Reviewed-by: Dust Li <dust.li@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/smc/smc_close.c