Skip to content
Commit 12ceb52f authored by Guo DaXing's avatar Guo DaXing Committed by Greg Kroah-Hartman
Browse files

net/smc: Fix loop in smc_listen

[ Upstream commit 9ebb0c4b ]

The kernel_listen function in smc_listen will fail when all the available
ports are occupied.  At this point smc->clcsock->sk->sk_data_ready has
been changed to smc_clcsock_data_ready.  When we call smc_listen again,
now both smc->clcsock->sk->sk_data_ready and smc->clcsk_data_ready point
to the smc_clcsock_data_ready function.

The smc_clcsock_data_ready() function calls lsmc->clcsk_data_ready which
now points to itself resulting in an infinite loop.

This patch restores smc->clcsock->sk->sk_data_ready with the old value.

Fixes: a60a2b1e

 ("net/smc: reduce active tcp_listen workers")
Signed-off-by: default avatarGuo DaXing <guodaxing@huawei.com>
Acked-by: default avatarTony Lu <tonylu@linux.alibaba.com>
Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c94cbd26
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