From: Kirill Tkhai Date: Tue, 13 Feb 2018 09:30:42 +0000 (+0300) Subject: net: Convert default_device_ops X-Git-Tag: v4.19~1326^2~446^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2608e6b7adc8b07194b855e2102d6f1a277e3f03;p=platform%2Fkernel%2Flinux-rpi3.git 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 Acked-by: Andrei Vagin Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index dc7506f..df5241c 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -8934,6 +8934,7 @@ static void __net_exit default_device_exit_batch(struct list_head *net_list) static struct pernet_operations __net_initdata default_device_ops = { .exit = default_device_exit, .exit_batch = default_device_exit_batch, + .async = true, }; /*