Skip to content

Commit 82ac39e

Browse files
lrq-maxkuba-moo
authored andcommittedOct 15, 2024
net/smc: Fix searching in list of known pnetids in smc_pnet_add_pnetid
pnetid of pi (not newly allocated pe) should be compared Fixes: e888a2e ("net/smc: introduce list of pnetids for Ethernet devices") Reviewed-by: D. Wythe <alibuda@linux.alibaba.com> Reviewed-by: Wen Gu <guwen@linux.alibaba.com> Signed-off-by: Li RongQing <lirongqing@baidu.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Gerd Bayer <gbayer@linux.ibm.com> Link: https://patch.msgid.link/20241014115321.33234-1-lirongqing@baidu.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent d0c3601 commit 82ac39e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎net/smc/smc_pnet.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ static int smc_pnet_add_pnetid(struct net *net, u8 *pnetid)
753753

754754
write_lock(&sn->pnetids_ndev.lock);
755755
list_for_each_entry(pi, &sn->pnetids_ndev.list, list) {
756-
if (smc_pnet_match(pnetid, pe->pnetid)) {
756+
if (smc_pnet_match(pnetid, pi->pnetid)) {
757757
refcount_inc(&pi->refcnt);
758758
kfree(pe);
759759
goto unlock;

0 commit comments

Comments
 (0)
Please sign in to comment.