Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75620
b: refs/heads/master
c: 6836545
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jan 21, 2008
1 parent 95c714a commit 922300b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 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: d4782c323d10d3698b71b6a6b3c7bdad33824658
refs/heads/master: 68365458a4252fa993b91a00f7a0b18fed399f0d
14 changes: 1 addition & 13 deletions trunk/drivers/net/veth.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,19 +459,7 @@ static __init int veth_init(void)

static __exit void veth_exit(void)
{
struct veth_priv *priv, *next;

rtnl_lock();
/*
* cannot trust __rtnl_link_unregister() to unregister all
* devices, as each ->dellink call will remove two devices
* from the list at once.
*/
list_for_each_entry_safe(priv, next, &veth_list, list)
veth_dellink(priv->dev);

__rtnl_link_unregister(&veth_link_ops);
rtnl_unlock();
rtnl_link_unregister(&veth_link_ops);
}

module_init(veth_init);
Expand Down
5 changes: 4 additions & 1 deletion trunk/net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,12 @@ void __rtnl_link_unregister(struct rtnl_link_ops *ops)
struct net *net;

for_each_net(net) {
restart:
for_each_netdev_safe(net, dev, n) {
if (dev->rtnl_link_ops == ops)
if (dev->rtnl_link_ops == ops) {
ops->dellink(dev);
goto restart;
}
}
}
list_del(&ops->list);
Expand Down

0 comments on commit 922300b

Please sign in to comment.