Skip to content

Commit 2608e6b

Browse files
Kirill Tkhaidavem330
authored andcommitted
net: Convert default_device_ops
These pernet operations consist of exit() and exit_batch() methods. default_device_exit() moves not-local and virtual devices to init_net. There is nothing exciting, because this may happen in any time on a working system, and rtnl_lock() and synchronize_net() protect us from all cases of external dereference. The same for default_device_exit_batch(). Similar unregisteration may happen in any time on a system. Here several lists (like todo_list), which are accessed under rtnl_lock(). After rtnl_unlock() and netdev_run_todo() all the devices are flushed. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Acked-by: Andrei Vagin <avagin@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9a4d105 commit 2608e6b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/core/dev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8934,6 +8934,7 @@ static void __net_exit default_device_exit_batch(struct list_head *net_list)
89348934
static struct pernet_operations __net_initdata default_device_ops = {
89358935
.exit = default_device_exit,
89368936
.exit_batch = default_device_exit_batch,
8937+
.async = true,
89378938
};
89388939

89398940
/*

0 commit comments

Comments
 (0)