]> git.baikalelectronics.ru Git - kernel.git/commit
inet: add READ_ONCE(sk->sk_bound_dev_if) in INET_MATCH()
authorEric Dumazet <edumazet@google.com>
Thu, 12 May 2022 16:56:01 +0000 (09:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 May 2022 11:17:25 +0000 (12:17 +0100)
commit9783869a6f8011f07141f790b4fd42a474c06e94
treec591cefada86457aee4870cd4d3ca45eedf33966
parent66f41b38a6fa9fffe44feb8df6b723fd0ab7cf28
inet: add READ_ONCE(sk->sk_bound_dev_if) in INET_MATCH()

INET_MATCH() runs without holding a lock on the socket.

We probably need to annotate most reads.

This patch makes INET_MATCH() an inline function
to ease our changes.

v2:

We remove the 32bit version of it, as modern compilers
should generate the same code really, no need to
try to be smarter.

Also make 'struct net *net' the first argument.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_hashtables.h
include/net/sock.h
net/ipv4/inet_hashtables.c
net/ipv4/udp.c