lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <41ba8de4-5c3f-4028-954a-286da85ca595@linux.alibaba.com>
Date: Sat, 12 Oct 2024 15:49:59 +0800
From: Wen Gu <guwen@...ux.alibaba.com>
To: Li RongQing <lirongqing@...du.com>, wenjia@...ux.ibm.com,
 jaka@...ux.ibm.com, alibuda@...ux.alibaba.com, tonylu@...ux.alibaba.com,
 davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
 pabeni@...hat.com, ubraun@...ux.ibm.com, kgraul@...ux.ibm.com,
 linux-s390@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] net/smc: fix wrong comparation in smc_pnet_add_pnetid



On 2024/10/11 14:19, Li RongQing wrote:
> pnetid of pi (not newly allocated pe) should be compared
> 
> Fixes: e888a2e8337c ("net/smc: introduce list of pnetids for Ethernet devices")
> Signed-off-by: Li RongQing <lirongqing@...du.com>
> ---
>   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;

Good catch, thanks!

Reviewed-by: Wen Gu <guwen@...ux.alibaba.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ