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: <c5e27a8a-739e-4b7d-a189-46b9c30361c8@linux.dev>
Date: Tue, 30 Jan 2024 21:14:49 +0000
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org
Cc: kuba@...nel.org, pabeni@...hat.com, davem@...emloft.net,
 edumazet@...gle.com, arkadiusz.kubalewski@...el.com
Subject: Re: [patch net-next] dpll: move xa_erase() call in to match
 dpll_pin_alloc() error path order

On 30/01/2024 15:58, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@...dia.com>
> 
> This is cosmetics. Move the call of xa_erase() in dpll_pin_put()
> so the order of cleanup calls matches the error path of
> dpll_pin_alloc().

Jiri, remind me please, why do we clean up xarray in error path in the
same order we allocate them?

The patch looks good,

Reviewed-by: Vadim Fedorenko <vadim.fedorenko@...ux.dev>

> 
> Signed-off-by: Jiri Pirko <jiri@...dia.com>
> ---
>   drivers/dpll/dpll_core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dpll/dpll_core.c b/drivers/dpll/dpll_core.c
> index 5152bd1b0daf..61e5c607a72f 100644
> --- a/drivers/dpll/dpll_core.c
> +++ b/drivers/dpll/dpll_core.c
> @@ -560,9 +560,9 @@ void dpll_pin_put(struct dpll_pin *pin)
>   {
>   	mutex_lock(&dpll_lock);
>   	if (refcount_dec_and_test(&pin->refcount)) {
> +		xa_erase(&dpll_pin_xa, pin->id);
>   		xa_destroy(&pin->dpll_refs);
>   		xa_destroy(&pin->parent_refs);
> -		xa_erase(&dpll_pin_xa, pin->id);
>   		dpll_pin_prop_free(&pin->prop);
>   		kfree(pin);
>   	}


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ