Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144587
b: refs/heads/master
c: 2382b15
h: refs/heads/master
i:
  144585: e35ccdc
  144583: c6e6ef9
v: v3
  • Loading branch information
Bruno Prémont authored and David S. Miller committed May 1, 2009
1 parent 722c4ab commit f1cb7c9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: acda074390270ca9e28f2a9729f7b835e2ad6da4
refs/heads/master: 2382b15bcc39228572ccf1d9a1185dcabb84c833
11 changes: 10 additions & 1 deletion trunk/drivers/net/netconsole.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ static int netconsole_netdev_event(struct notifier_block *this,
struct netconsole_target *nt;
struct net_device *dev = ptr;

if (!(event == NETDEV_CHANGENAME))
if (!(event == NETDEV_CHANGENAME || event == NETDEV_UNREGISTER))
goto done;

spin_lock_irqsave(&target_list_lock, flags);
Expand All @@ -675,6 +675,15 @@ static int netconsole_netdev_event(struct notifier_block *this,
case NETDEV_CHANGENAME:
strlcpy(nt->np.dev_name, dev->name, IFNAMSIZ);
break;
case NETDEV_UNREGISTER:
if (!nt->enabled)
break;
netpoll_cleanup(&nt->np);
nt->enabled = 0;
printk(KERN_INFO "netconsole: network logging stopped"
", interface %s unregistered\n",
dev->name);
break;
}
}
netconsole_target_put(nt);
Expand Down

0 comments on commit f1cb7c9

Please sign in to comment.