[NET]: Make device event notification network namespace safe
[linux-block.git] / drivers / net / wan / lapbether.c
index ca8b3c3cb931850c8df19de6de82054e0cf2abde..699b93406dfbe10c83d2d81c2ab5d036b2deb29c 100644 (file)
@@ -394,6 +394,9 @@ static int lapbeth_device_event(struct notifier_block *this,
        struct lapbethdev *lapbeth;
        struct net_device *dev = ptr;
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        if (!dev_is_ethdev(dev))
                return NOTIFY_DONE;