]> git.neil.brown.name Git - history.git/commitdiff
[NET]: Fix lapbether bad scheduling while atomic.
authorStephen Hemminger <shemminger@osdl.org>
Fri, 16 Apr 2004 07:59:31 +0000 (00:59 -0700)
committerStephen Hemminger <shemminger@osdl.org>
Fri, 16 Apr 2004 07:59:31 +0000 (00:59 -0700)
Bring up/down network devices with lapbether causes scheduling while
atomic (if preempt enabled).

The calls to rcu_read_lock are unnecessary since lapb_device_event
is called from notifier with the rtnetlink semaphore held, it is
already protected from the labp_devices list changing.

drivers/net/wan/lapbether.c

index f062cd07838be96372210e5bf572aae7e4b9831b..c8f3187e12c9991c87e361bbe66f914b16fb143f 100644 (file)
@@ -392,6 +392,8 @@ static void lapbeth_free_device(struct lapbethdev *lapbeth)
 
 /*
  *     Handle device status changes.
+ *
+ * Called from notifier with RTNL held.
  */
 static int lapbeth_device_event(struct notifier_block *this,
                                unsigned long event, void *ptr)
@@ -402,7 +404,6 @@ static int lapbeth_device_event(struct notifier_block *this,
        if (!dev_is_ethdev(dev))
                return NOTIFY_DONE;
 
-       rcu_read_lock();
        switch (event) {
        case NETDEV_UP:
                /* New ethernet device -> new LAPB interface     */
@@ -422,7 +423,6 @@ static int lapbeth_device_event(struct notifier_block *this,
                        lapbeth_free_device(lapbeth);
                break;
        }
-       rcu_read_unlock();
 
        return NOTIFY_DONE;
 }