* [PATCH net-next] dev: ensure that dellink is set before calling it
@ 2014-03-27 13:11 Nicolas Dichtel
2014-03-27 13:27 ` Nicolas Dichtel
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Dichtel @ 2014-03-27 13:11 UTC (permalink / raw)
To: davem; +Cc: netdev, Nicolas Dichtel
default_device_exit_batch() was calling it as soon as dev->rtnl_link_ops was
set.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
I target this patch to net-next because I did not found an in-tree driver
which is impacted.
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 48dd323d5918..f4010d16b351 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6940,7 +6940,7 @@ static void __net_exit default_device_exit_batch(struct list_head *net_list)
rtnl_lock_unregistering(net_list);
list_for_each_entry(net, net_list, exit_list) {
for_each_netdev_reverse(net, dev) {
- if (dev->rtnl_link_ops)
+ if (dev->rtnl_link_ops && dev->rtnl_link_ops->dellink)
dev->rtnl_link_ops->dellink(dev, &dev_kill_list);
else
unregister_netdevice_queue(dev, &dev_kill_list);
--
1.8.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-27 13:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-27 13:11 [PATCH net-next] dev: ensure that dellink is set before calling it Nicolas Dichtel
2014-03-27 13:27 ` Nicolas Dichtel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.