Merge "igmp: Add ip_mc_list lock in ip_check_mc_rcu"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
17ee78ddfd
@@ -2735,6 +2735,7 @@ int ip_check_mc_rcu(struct in_device *in_dev, __be32 mc_addr, __be32 src_addr, u
|
||||
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;
|
||||
@@ -2745,6 +2746,7 @@ int ip_check_mc_rcu(struct in_device *in_dev, __be32 mc_addr, __be32 src_addr, u
|
||||
im->sfcount[MCAST_EXCLUDE];
|
||||
else
|
||||
rv = im->sfcount[MCAST_EXCLUDE] != 0;
|
||||
spin_unlock_bh(&im->lock);
|
||||
} else
|
||||
rv = 1; /* unspecified source; tentatively allow */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user