Re: [PATCH v2] net: mark racy access on sk->sk_rcvbuf

From: Eric Dumazet
Date: Mon Mar 25 2024 - 12:11:15 EST


On Thu, Mar 21, 2024 at 9:44 AM linke li <lilinke99@xxxxxx> wrote:
>
> sk->sk_rcvbuf in __sock_queue_rcv_skb() and __sk_receive_skb() can be
> changed by other threads. Mark this as benign using READ_ONCE().
>
> This patch is aimed at reducing the number of benign races reported by
> KCSAN in order to focus future debugging effort on harmful races.
>
> Signed-off-by: linke li <lilinke99@xxxxxx>
> ---
> v1 -> v2: include sk->sk_rcvbuf in __sock_queue_rcv_skb()

Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>