Commit 6ffc57e
af_packet: do not use READ_ONCE() in packet_bind()
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.
READ_ONCE() in writers are often an evidence of something being wrong.
Fixes: 822b5a1 ("af_packet: Fix data-races of pkt_sk(sk)->num.")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20230526154342.2533026-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 0684f29 commit 6ffc57e
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3201 | 3201 | | |
3202 | 3202 | | |
3203 | 3203 | | |
| 3204 | + | |
| 3205 | + | |
| 3206 | + | |
3204 | 3207 | | |
3205 | 3208 | | |
3206 | 3209 | | |
| |||
3299 | 3302 | | |
3300 | 3303 | | |
3301 | 3304 | | |
3302 | | - | |
| 3305 | + | |
3303 | 3306 | | |
3304 | 3307 | | |
3305 | 3308 | | |
| |||
3316 | 3319 | | |
3317 | 3320 | | |
3318 | 3321 | | |
3319 | | - | |
3320 | | - | |
| 3322 | + | |
3321 | 3323 | | |
3322 | 3324 | | |
3323 | 3325 | | |
| |||
0 commit comments