This is a note to let you know that I've just added the patch titled net/smc: Fix searching in list of known pnetids in smc_pnet_add_pnetid to the 6.11-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-smc-fix-searching-in-list-of-known-pnetids-in-sm.patch and it can be found in the queue-6.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 1fc4e4db464453c55809e4b9d0d828385732d2e0 Author: Li RongQing <lirongqing@xxxxxxxxx> Date: Mon Oct 14 19:53:21 2024 +0800 net/smc: Fix searching in list of known pnetids in smc_pnet_add_pnetid [ Upstream commit 82ac39ebd6db0c9f7a97a934bda1e3e101a9d201 ] pnetid of pi (not newly allocated pe) should be compared Fixes: e888a2e8337c ("net/smc: introduce list of pnetids for Ethernet devices") Reviewed-by: D. Wythe <alibuda@xxxxxxxxxxxxxxxxx> Reviewed-by: Wen Gu <guwen@xxxxxxxxxxxxxxxxx> Signed-off-by: Li RongQing <lirongqing@xxxxxxxxx> Reviewed-by: Simon Horman <horms@xxxxxxxxxx> Reviewed-by: Gerd Bayer <gbayer@xxxxxxxxxxxxx> Link: https://patch.msgid.link/20241014115321.33234-1-lirongqing@xxxxxxxxx Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c index 2adb92b8c4699..dbcc72b43d0c0 100644 --- a/net/smc/smc_pnet.c +++ b/net/smc/smc_pnet.c @@ -753,7 +753,7 @@ static int smc_pnet_add_pnetid(struct net *net, u8 *pnetid) write_lock(&sn->pnetids_ndev.lock); list_for_each_entry(pi, &sn->pnetids_ndev.list, list) { - if (smc_pnet_match(pnetid, pe->pnetid)) { + if (smc_pnet_match(pnetid, pi->pnetid)) { refcount_inc(&pi->refcnt); kfree(pe); goto unlock;