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] [thread-next>] [day] [month] [year] [list]
Message-ID: <c2d160cd-b128-47ea-be0c-9775aa6ea0cc@stanley.mountain>
Date: Fri, 14 Mar 2025 13:23:04 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Matthew Wilcox <willy@...radead.org>,
	Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
Cc: netdev@...r.kernel.org, jiri@...nulli.us, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	horms@...nel.org, pierre@...ckhpc.com, hkallweit1@...il.com,
	linux@...linux.org.uk, maxime.chevallier@...tlin.com,
	christophe.leroy@...roup.eu, arkadiusz.kubalewski@...el.com,
	vadim.fedorenko@...ux.dev
Subject: Re: [PATCH net v2 0/3] fix xa_alloc_cyclic() return checks

On Wed, Mar 12, 2025 at 10:52:48AM +0100, Michal Swiatkowski wrote:
> Pierre Riteau <pierre@...ckhpc.com> found suspicious handling an error
> from xa_alloc_cyclic() in scheduler code [1]. The same is done in few
> other places.
> 
> v1 --> v2: [2]
>  * add fixes tags
>  * fix also the same usage in dpll and phy
> 
> [1] https://lore.kernel.org/netdev/20250213223610.320278-1-pierre@stackhpc.com/
> [2] https://lore.kernel.org/netdev/20250214132453.4108-1-michal.swiatkowski@linux.intel.com/
> 
> Michal Swiatkowski (3):
>   devlink: fix xa_alloc_cyclic() error handling
>   dpll: fix xa_alloc_cyclic() error handling
>   phy: fix xa_alloc_cyclic() error handling

Maybe there should be a wrapper around xa_alloc_cyclic() for people who
don't care about the 1 return?

int wrapper()
{
        ret = xa_alloc_cyclic();
        if (ret < 0)
                return ret;
        rerturn 0;
}

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ