diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index d961e6c2d09d..480c906cb374 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -1582,8 +1582,8 @@ skip_routeinfo: memcpy(&n, ((u8 *)(ndopts.nd_opts_mtu+1))+2, sizeof(mtu)); mtu = ntohl(n); - if (in6_dev->ra_mtu != mtu) { - in6_dev->ra_mtu = mtu; + if (READ_ONCE(in6_dev->ra_mtu) != mtu) { + WRITE_ONCE(in6_dev->ra_mtu, mtu); send_ifinfo_notify = true; }