]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix data-races around sysctl_tcp_l3mdev_accept.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 13 Jul 2022 20:51:59 +0000 (13:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Jul 2022 10:49:55 +0000 (11:49 +0100)
commitc5b8f9b75d8908220f1bedcfd99843f4930fb094
treefd9b511dd71501ff5aacc4a0c3a842800c86fbbd
parent68b9ee3f04780dbca87d6895767af627fc547ac6
tcp: Fix data-races around sysctl_tcp_l3mdev_accept.

While reading sysctl_tcp_l3mdev_accept, it can be changed concurrently.
Thus, we need to add READ_ONCE() to its readers.

Fixes: ddf3fa7765d7 ("net: Allow accepted sockets to be bound to l3mdev domain")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_hashtables.h
include/net/inet_sock.h