diff mbox series

[v2] net/smc: Fix searching in list of known pnetids in smc_pnet_add_pnetid

Message ID 20241014115321.33234-1-lirongqing@baidu.com (mailing list archive)
State Accepted
Commit 82ac39ebd6db0c9f7a97a934bda1e3e101a9d201
Delegated to: Netdev Maintainers
Headers show
Series [v2] net/smc: Fix searching in list of known pnetids in smc_pnet_add_pnetid | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 5 this patch: 5
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers fail 1 blamed authors not CCed: kgraul@linux.ibm.com; 10 maintainers not CCed: tonylu@linux.alibaba.com kgraul@linux.ibm.com linux-s390@vger.kernel.org pabeni@redhat.com kuba@kernel.org edumazet@google.com wenjia@linux.ibm.com guwen@linux.alibaba.com jaka@linux.ibm.com alibuda@linux.alibaba.com
netdev/build_clang success Errors and warnings before: 3 this patch: 3
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 4 this patch: 4
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-10-15--06-00 (tests: 777)

Commit Message

Li,Rongqing Oct. 14, 2024, 11:53 a.m. UTC
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(-)

Comments

Simon Horman Oct. 14, 2024, 12:32 p.m. UTC | #1
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>
Gerd Bayer Oct. 14, 2024, 3:06 p.m. UTC | #2
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>
patchwork-bot+netdevbpf@kernel.org Oct. 15, 2024, 6 p.m. UTC | #3
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!
diff mbox series

Patch

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;