This is a note to let you know that I've just added the patch titled

    net: allow netif_carrier to be called safely from IRQ

to the 3.0-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-allow-netif_carrier-to-be-called-safely-from-irq.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <sta...@kernel.org> know about it.


>From 38be383d73917e4ea2d5676104037742e50c1e64 Mon Sep 17 00:00:00 2001
From: stephen hemminger <shemmin...@vyatta.com>
Date: Fri, 22 Jul 2011 12:53:56 +0000
Subject: net: allow netif_carrier to be called safely from IRQ


From: stephen hemminger <shemmin...@vyatta.com>

[ Upstream commit 1821f7cd65ad9ea56580b830ac79bf4c4fef59cb ]

As reported by Ben Greer and Froncois Romieu. The code path in
the netif_carrier code leads it to try and disable
a late workqueue to reenable it immediately
netif_carrier_on
-> linkwatch_fire_event
   -> linkwatch_schedule_work
      -> cancel_delayed_work
         -> del_timer_sync

If __cancel_delayed_work is used instead then there is no
problem of waiting for running linkwatch_event.

There is a race between linkwatch_event running re-scheduling
but it is harmless to schedule an extra scan of the linkwatch queue.

Signed-off-by: Stephen Hemminger <shemmin...@vyatta.com>
Signed-off-by: David S. Miller <da...@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gre...@suse.de>
---
 net/core/link_watch.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/core/link_watch.c
+++ b/net/core/link_watch.c
@@ -126,7 +126,7 @@ static void linkwatch_schedule_work(int
                return;
 
        /* It's already running which is good enough. */
-       if (!cancel_delayed_work(&linkwatch_work))
+       if (!__cancel_delayed_work(&linkwatch_work))
                return;
 
        /* Otherwise we reschedule it again for immediate execution. */


Patches currently in stable-queue which might be from shemmin...@vyatta.com are

queue-3.0/net-allow-netif_carrier-to-be-called-safely-from-irq.patch

_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to