[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZHDa3kJH7+cmBV/4@nanopsycho>
Date: Fri, 26 May 2023 18:14:22 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, eric.dumazet@...il.com,
Kuniyuki Iwashima <kuniyu@...zon.com>,
Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH net] af_packet: do not use READ_ONCE() in packet_bind()
Fri, May 26, 2023 at 05:43:42PM CEST, edumazet@...gle.com wrote:
>A recent patch added READ_ONCE() in packet_bind() and packet_bind_spkt()
>
>This is better handled by reading pkt_sk(sk)->num later
>in packet_do_bind() while appropriate lock is held.
Nit: easier to understand the desctiption if you use imperative mood,
telling the codebase what to do.
>
>READ_ONCE() in writers are often an evidence of something being wrong.
>
>Fixes: 822b5a1c17df ("af_packet: Fix data-races of pkt_sk(sk)->num.")
>Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Reviewed-by: Jiri Pirko <jiri@...dia.com>
Powered by blists - more mailing lists