]> git.baikalelectronics.ru Git - kernel.git/commit
net: Convert default_device_ops
authorKirill Tkhai <ktkhai@virtuozzo.com>
Tue, 13 Feb 2018 09:30:42 +0000 (12:30 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Feb 2018 15:36:09 +0000 (10:36 -0500)
commitf1a344c08e82002542d2f137c0ebfc9a76aba528
treec395fb778c60ba081355bc71cb3e23933044ba34
parentf0040b62f24e64aa83d8c767405f14623a28c69e
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>
net/core/dev.c