diff options
author | Li RongQing <lirongqing@baidu.com> | 2024-10-14 13:53:21 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-10-15 19:56:31 +0200 |
commit | 82ac39ebd6db0c9f7a97a934bda1e3e101a9d201 (patch) | |
tree | fe8f35c1d6bbcd1ba8fd4f0ee4bf4a8d93e4ed8c /net/smc/smc_pnet.c | |
parent | net: macb: Avoid 20s boot delay by skipping MDIO bus registration for fixed-l... (diff) | |
download | linux-82ac39ebd6db0c9f7a97a934bda1e3e101a9d201.tar.xz linux-82ac39ebd6db0c9f7a97a934bda1e3e101a9d201.zip |
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: e888a2e8337c ("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>
Diffstat (limited to '')
-rw-r--r-- | net/smc/smc_pnet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c index 1dd362326c0a..a04aa0e882f8 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; |