netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][v2] net/smc: Fix searching in list of known pnetids in smc_pnet_add_pnetid
@ 2024-10-14 11:53 Li RongQing
  2024-10-14 12:32 ` Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Li RongQing @ 2024-10-14 11:53 UTC (permalink / raw)
  To: netdev; +Cc: Li RongQing

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>
---
Diff with v1: change commit header as Gerd Bayer suggested
Sorry for not CC all maintainers, since this patch was rejected by netdev twice

 net/smc/smc_pnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c
index 1dd3623..a04aa0e 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;
-- 
2.9.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH][v2] net/smc: Fix searching in list of known pnetids in smc_pnet_add_pnetid
  2024-10-14 11:53 [PATCH][v2] net/smc: Fix searching in list of known pnetids in smc_pnet_add_pnetid Li RongQing
@ 2024-10-14 12:32 ` Simon Horman
  2024-10-14 15:06 ` Gerd Bayer
  2024-10-15 18:00 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2024-10-14 12:32 UTC (permalink / raw)
  To: Li RongQing; +Cc: netdev

On Mon, Oct 14, 2024 at 07:53:21PM +0800, Li RongQing wrote:
> 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>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][v2] net/smc: Fix searching in list of known pnetids in smc_pnet_add_pnetid
  2024-10-14 11:53 [PATCH][v2] net/smc: Fix searching in list of known pnetids in smc_pnet_add_pnetid Li RongQing
  2024-10-14 12:32 ` Simon Horman
@ 2024-10-14 15:06 ` Gerd Bayer
  2024-10-15 18:00 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Gerd Bayer @ 2024-10-14 15:06 UTC (permalink / raw)
  To: Li RongQing, netdev

On Mon, 2024-10-14 at 19:53 +0800, Li RongQing wrote:
> 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>
> ---
> Diff with v1: change commit header as Gerd Bayer suggested
> Sorry for not CC all maintainers, since this patch was rejected by
> netdev twice
> 
>  net/smc/smc_pnet.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c
> index 1dd3623..a04aa0e 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;

Thanks for adapting the subject!
Reviewed-by: Gerd Bayer <gbayer@linux.ibm.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][v2] net/smc: Fix searching in list of known pnetids in smc_pnet_add_pnetid
  2024-10-14 11:53 [PATCH][v2] net/smc: Fix searching in list of known pnetids in smc_pnet_add_pnetid Li RongQing
  2024-10-14 12:32 ` Simon Horman
  2024-10-14 15:06 ` Gerd Bayer
@ 2024-10-15 18:00 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-15 18:00 UTC (permalink / raw)
  To: Li RongQing; +Cc: netdev

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 14 Oct 2024 19:53:21 +0800 you wrote:
> 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>
> 
> [...]

Here is the summary with links:
  - [v2] net/smc: Fix searching in list of known pnetids in smc_pnet_add_pnetid
    https://git.kernel.org/netdev/net/c/82ac39ebd6db

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-15 18:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-14 11:53 [PATCH][v2] net/smc: Fix searching in list of known pnetids in smc_pnet_add_pnetid Li RongQing
2024-10-14 12:32 ` Simon Horman
2024-10-14 15:06 ` Gerd Bayer
2024-10-15 18:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).