In function mld_send_cr, the first loop is already protected by idev->mc_lock, it dont need idev->lock read lock, hence moving it only to second for loop.
Signed-off-by: Guruswamy Basavaiah <[email protected]> --- net/ipv6/mcast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index d64ee7e..d8e7e15 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c @@ -1860,7 +1860,6 @@ static void mld_send_cr(struct inet6_dev *idev) struct sk_buff *skb = NULL; int type, dtype; - read_lock_bh(&idev->lock); spin_lock(&idev->mc_lock); /* deleted MCA's */ @@ -1897,6 +1896,7 @@ static void mld_send_cr(struct inet6_dev *idev) } spin_unlock(&idev->mc_lock); + read_lock_bh(&idev->lock); /* change recs */ for (pmc = idev->mc_list; pmc; pmc = pmc->next) { spin_lock_bh(&pmc->mca_lock); -- 2.9.5
