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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 29 Sep 2021 14:14:57 +0200
From:   Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To:     Magnus Karlsson <magnus.karlsson@...il.com>
Cc:     magnus.karlsson@...el.com, bjorn@...nel.org, ast@...nel.org,
        daniel@...earbox.net, netdev@...r.kernel.org,
        jonathan.lemon@...il.com, nathan@...nel.org, bpf@...r.kernel.org
Subject: Re: [PATCH bpf-next] xsk: fix clang build error in __xp_alloc

On Wed, Sep 29, 2021 at 08:14:03AM +0200, Magnus Karlsson wrote:
> From: Magnus Karlsson <magnus.karlsson@...el.com>
> 
> Fix a build error with clang in __xp_alloc().
> 
> net/xdp/xsk_buff_pool.c:465:15: error: variable 'xskb' is uninitialized
> when used here [-Werror,-Wuninitialized]
>                         xp_release(xskb);
>                                    ^~~~
> 
> This is correctly detected by clang, but not gcc. In fact, the
> xp_release() statement should not be there at all in the refactored
> code, so just remove it.

Acked-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>

> 
> Fixes: 94033cd8e73b ("xsk: Optimize for aligned case")
> Reported-by: Nathan Chancellor <nathan@...nel.org>
> Signed-off-by: Magnus Karlsson <magnus.karlsson@...el.com>
> ---
>  net/xdp/xsk_buff_pool.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/xdp/xsk_buff_pool.c b/net/xdp/xsk_buff_pool.c
> index 96b14e51ba7e..90c4e1e819d3 100644
> --- a/net/xdp/xsk_buff_pool.c
> +++ b/net/xdp/xsk_buff_pool.c
> @@ -462,7 +462,6 @@ static struct xdp_buff_xsk *__xp_alloc(struct xsk_buff_pool *pool)
>  	for (;;) {
>  		if (!xskq_cons_peek_addr_unchecked(pool->fq, &addr)) {
>  			pool->fq->queue_empty_descs++;
> -			xp_release(xskb);
>  			return NULL;
>  		}
>  
> 
> base-commit: 72e1781a5de9e3ee804e24f7ce9a7dd85596fc51
> -- 
> 2.29.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ