Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361431
b: refs/heads/master
c: 3f315be
h: refs/heads/master
i:
  361429: 5a76891
  361427: 3b1e0eb
  361423: 74af0cf
v: v3
  • Loading branch information
Veaceslav Falico authored and David S. Miller committed Mar 12, 2013
1 parent d438559 commit a22ab0f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 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: 3da889b616164bde76a37350cf28e0d17a94e979
refs/heads/master: 3f315bef23075ea8a98a6fe4221a83b83456d970
15 changes: 9 additions & 6 deletions trunk/drivers/net/netconsole.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,7 @@ static int netconsole_netdev_event(struct notifier_block *this,
goto done;

spin_lock_irqsave(&target_list_lock, flags);
restart:
list_for_each_entry(nt, &target_list, list) {
netconsole_target_get(nt);
if (nt->np.dev == dev) {
Expand All @@ -678,15 +679,17 @@ static int netconsole_netdev_event(struct notifier_block *this,
case NETDEV_UNREGISTER:
/*
* rtnl_lock already held
* we might sleep in __netpoll_cleanup()
*/
if (nt->np.dev) {
__netpoll_cleanup(&nt->np);
dev_put(nt->np.dev);
nt->np.dev = NULL;
}
spin_unlock_irqrestore(&target_list_lock, flags);
__netpoll_cleanup(&nt->np);
spin_lock_irqsave(&target_list_lock, flags);
dev_put(nt->np.dev);
nt->np.dev = NULL;
nt->enabled = 0;
stopped = true;
break;
netconsole_target_put(nt);
goto restart;
}
}
netconsole_target_put(nt);
Expand Down

0 comments on commit a22ab0f

Please sign in to comment.