igmp: Fix data-races around sysctl_igmp_max_msf.
[linux-2.6-microblaze.git] / net / ipv4 / igmp.c
index 792ea1b..cd7839d 100644 (file)
@@ -2384,7 +2384,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct
        }
        /* else, add a new source to the filter */
 
-       if (psl && psl->sl_count >= net->ipv4.sysctl_igmp_max_msf) {
+       if (psl && psl->sl_count >= READ_ONCE(net->ipv4.sysctl_igmp_max_msf)) {
                err = -ENOBUFS;
                goto done;
        }