ip: Fix a data-race around sysctl_fwmark_reflect.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 13 Jul 2022 20:51:57 +0000 (13:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Jul 2022 10:49:55 +0000 (11:49 +0100)
commit51aa222506e1cbfb80864d8e5955953bfac6e4be
tree473cbabb0ef1250f586ab45b70f0993ff607e9c1
parenta947ba2589523e1effa2c30be76c465b35c675af
ip: Fix a data-race around sysctl_fwmark_reflect.

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

Fixes: b2d88dea8bd2 ("net: add a sysctl to reflect the fwmark on replies")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip.h