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>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 17 Apr 2023 12:44:50 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Leon Romanovsky <leon@...nel.org>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
        pabeni@...hat.com, saeedm@...dia.com
Subject: Re: [PATCH net-next] eth: mlx5: avoid iterator use outside of a
 loop

On Sun, 16 Apr 2023 13:17:53 +0300 Leon Romanovsky wrote:
> > -	return mlx5_irq_get_affinity_mask(eq->core.irq);
> > +	WARN_ON_ONCE(1);
> > +	return 0;  
> 
> I would do it without changing last return, but "return ERR_PTR(0);"
> will do the trick too.

Hm, I've not seen ERR_PTR(0) used before. I'll return NULL. 
Looks like callers pass the value to cpumask_first() without checking 
so either way the warning will be followed by a crash 🤷️

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ