diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2022-07-13 22:51:51 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-07-15 12:49:55 +0200 |
commit | 8281b7ec5c56b71cb2cc5a1728b41607be66959c (patch) | |
tree | 1c9563f175e6e4528ca2f2d33256c18efca097bb /drivers | |
parent | x86/speculation: Use DECLARE_PER_CPU for x86_spec_ctrl_current (diff) | |
download | linux-8281b7ec5c56b71cb2cc5a1728b41607be66959c.tar.xz linux-8281b7ec5c56b71cb2cc5a1728b41607be66959c.zip |
ip: Fix data-races around sysctl_ip_default_ttl.
While reading sysctl_ip_default_ttl, it can be changed concurrently.
Thus, we need to add READ_ONCE() to its readers.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/flower/action.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/flower/action.c b/drivers/net/ethernet/netronome/nfp/flower/action.c index 0147de405365..ffb6f6d05a07 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/action.c +++ b/drivers/net/ethernet/netronome/nfp/flower/action.c @@ -474,7 +474,7 @@ nfp_fl_set_tun(struct nfp_app *app, struct nfp_fl_set_tun *set_tun, set_tun->ttl = ip4_dst_hoplimit(&rt->dst); ip_rt_put(rt); } else { - set_tun->ttl = net->ipv4.sysctl_ip_default_ttl; + set_tun->ttl = READ_ONCE(net->ipv4.sysctl_ip_default_ttl); } } |