]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/smc: avoid early lgr access in smc_clc_wait_msg
authorRuijie Li <ruijieli51@gmail.com>
Wed, 22 Apr 2026 15:40:18 +0000 (23:40 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 23 Apr 2026 18:00:57 +0000 (11:00 -0700)
commit5a8db80f721deee8e916c2cfdee78decda02ce4f
tree8a25d0fec8609f79173d671f4387732e8816733a
parent3d1f20727a635811f6b77801a7b57b8995268abd
net/smc: avoid early lgr access in smc_clc_wait_msg

A CLC decline can be received while the handshake is still in an early
stage, before the connection has been associated with a link group.

The decline handling in smc_clc_wait_msg() updates link-group level sync
state for first-contact declines, but that state only exists after link
group setup has completed. Guard the link-group update accordingly and
keep the per-socket peer diagnosis handling unchanged.

This preserves the existing sync_err handling for established link-group
contexts and avoids touching link-group state before it is available.

Fixes: 0cfdd8f92cac ("smc: connection and link group creation")
Cc: stable@kernel.org
Reported-by: Yuan Tan <yuantan098@gmail.com>
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <bird@lzu.edu.cn>
Signed-off-by: Ruijie Li <ruijieli51@gmail.com>
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
Reviewed-by: Dust Li <dust.li@linux.alibaba.com>
Link: https://patch.msgid.link/08c68a5c817acf198cce63d22517e232e8d60718.1776850759.git.ruijieli51@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/smc/smc_clc.c