Message ID | 20210910122917.893921909@linuxfoundation.org |
---|---|
State | New |
Headers | show |
Series | None | expand |
--- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -2730,6 +2730,7 @@ int ip_check_mc_rcu(struct in_device *in rv = 1; } else if (im) { if (src_addr) { + spin_lock_bh(&im->lock); for (psf = im->sources; psf; psf = psf->sf_next) { if (psf->sf_inaddr == src_addr) break; @@ -2740,6 +2741,7 @@ int ip_check_mc_rcu(struct in_device *in im->sfcount[MCAST_EXCLUDE]; else rv = im->sfcount[MCAST_EXCLUDE] != 0; + spin_unlock_bh(&im->lock); } else rv = 1; /* unspecified source; tentatively allow */ }