[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: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
{
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)