Commit 4826833f authored by Alexey Kuznetsov's avatar Alexey Kuznetsov Committed by David S. Miller

[IPV4]: Fix deadlock in IGMP locking.

parent c60ef48a
......@@ -255,30 +255,22 @@ static void igmp_timer_expire(unsigned long data)
{
struct ip_mc_list *im=(struct ip_mc_list *)data;
struct in_device *in_dev = im->interface;
int err;
spin_lock(&im->lock);
im->tm_running=0;
if (IGMP_V1_SEEN(in_dev))
err = igmp_send_report(in_dev->dev, im->multiaddr, IGMP_HOST_MEMBERSHIP_REPORT);
else
err = igmp_send_report(in_dev->dev, im->multiaddr, IGMP_HOST_NEW_MEMBERSHIP_REPORT);
/* Failed. Retry later. */
if (err) {
if (!in_dev->dead)
igmp_start_timer(im, IGMP_Unsolicited_Report_Interval);
goto out;
}
if (im->unsolicit_count) {
im->unsolicit_count--;
igmp_start_timer(im, IGMP_Unsolicited_Report_Interval);
}
im->reporter = 1;
out:
spin_unlock(&im->lock);
if (IGMP_V1_SEEN(in_dev))
igmp_send_report(in_dev->dev, im->multiaddr, IGMP_HOST_MEMBERSHIP_REPORT);
else
igmp_send_report(in_dev->dev, im->multiaddr, IGMP_HOST_NEW_MEMBERSHIP_REPORT);
ip_ma_put(im);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment