mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
ip: Fix data-races around sysctl_ip_no_pmtu_disc.
[ Upstream commit 0968d2a441bf6afb551fd99e60fa65ed67068963 ]
While reading sysctl_ip_no_pmtu_disc, it can be changed concurrently.
Thus, we need to add READ_ONCE() to its readers.
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Kuniyuki Iwashima <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
16cb6717f4
commit
5af6d92263
4 changed files with 4 additions and 4 deletions
|
|
@ -2488,7 +2488,7 @@ int __xfrm_init_state(struct xfrm_state *x, bool init_replay, bool offload)
|
|||
int err;
|
||||
|
||||
if (family == AF_INET &&
|
||||
xs_net(x)->ipv4.sysctl_ip_no_pmtu_disc)
|
||||
READ_ONCE(xs_net(x)->ipv4.sysctl_ip_no_pmtu_disc))
|
||||
x->props.flags |= XFRM_STATE_NOPMTUDISC;
|
||||
|
||||
err = -EPROTONOSUPPORT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue