Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
[cascardo/linux.git] / drivers / net / macvlan.c
index 0ef0eb0..0fc9dc7 100644 (file)
@@ -788,6 +788,10 @@ static int macvlan_device_event(struct notifier_block *unused,
                }
                break;
        case NETDEV_UNREGISTER:
+               /* twiddle thumbs on netns device moves */
+               if (dev->reg_state != NETREG_UNREGISTERING)
+                       break;
+
                list_for_each_entry_safe(vlan, next, &port->vlans, list)
                        vlan->dev->rtnl_link_ops->dellink(vlan->dev, NULL);
                break;