docs: net: explain struct net_device lifetime

commit 2b446e650b418f9a9e75f99852e2f2560cabfa17 upstream.

Explain the two basic flows of struct net_device's operation.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jakub Kicinski
2022-07-15 19:26:26 +03:00
committed by Greg Kroah-Hartman
parent 7a99c7c32c
commit 2686f62fa7
2 changed files with 166 additions and 7 deletions

View File

@@ -3444,7 +3444,7 @@ replay:
if (ops->newlink) {
err = ops->newlink(link_net ? : net, dev, tb, data, extack);
/* Drivers should call free_netdev() in ->destructor
/* Drivers should set dev->needs_free_netdev
* and unregister it on failure after registration
* so that device could be finally freed in rtnl_unlock.
*/