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: <c1c2a430-85f8-5d83-6837-fe3ce3579ad7@gmail.com>
Date:   Thu, 18 Aug 2022 14:22:20 +0100
From:   Edward Cree <ecree.xilinx@...il.com>
To:     Kuniyuki Iwashima <kuniyu@...zon.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>
Cc:     Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org,
        Edward Cree <ecree@...arflare.com>
Subject: Re: [PATCH v2 net 15/17] net: Fix a data-race around
 gro_normal_batch.

On 18/08/2022 04:52, Kuniyuki Iwashima wrote:
> While reading gro_normal_batch, it can be changed concurrently.
> Thus, we need to add READ_ONCE() to its reader.
> 
> Fixes: 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs")
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
> ---
> CC: Edward Cree <ecree@...arflare.com>

Acked-by: Edward Cree <ecree.xilinx@...il.com>

> ---
>  include/net/gro.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/net/gro.h b/include/net/gro.h
> index 867656b0739c..24003dea8fa4 100644
> --- a/include/net/gro.h
> +++ b/include/net/gro.h
> @@ -439,7 +439,7 @@ static inline void gro_normal_one(struct napi_struct *napi, struct sk_buff *skb,
>  {
>  	list_add_tail(&skb->list, &napi->rx_list);
>  	napi->rx_count += segs;
> -	if (napi->rx_count >= gro_normal_batch)
> +	if (napi->rx_count >= READ_ONCE(gro_normal_batch))
>  		gro_normal_list(napi);
>  }
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ