Skip to content

Commit 82ac39e

Browse files
lrq-maxkuba-moo
authored andcommitted
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 <[email protected]> Reviewed-by: Wen Gu <[email protected]> Signed-off-by: Li RongQing <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Gerd Bayer <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
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

Lines changed: 1 addition & 1 deletion
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)