Commit c33790ec authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by Greg Kroah-Hartman

Phonet: device notifier only runs on initial namespace

[bwh: This is only applicable to 2.6.32. Phonet was fixed upstream to
work with multiple net namespaces.]

This should really fix the OOPS when doing:

  unshare(CLONE_NEWNET);
  exit(0);

while the phonet module is loaded.
Signed-off-by: default avatarRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ffa7db22
......@@ -225,6 +225,9 @@ static int phonet_device_notify(struct notifier_block *me, unsigned long what,
{
struct net_device *dev = arg;
if (!net_eq(dev_net(dev), &init_net))
return 0;
switch (what) {
case NETDEV_REGISTER:
if (dev->type == ARPHRD_PHONET)
......
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