Merge branch 'devlink-unregister'
authorDavid S. Miller <davem@davemloft.net>
Fri, 6 Jan 2023 12:56:20 +0000 (12:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Jan 2023 12:56:20 +0000 (12:56 +0000)
commit6bd4755c7c499dbcef46eaaeafa1a319da583b29
tree4eb9d0f62f2fd24e44f7e5e83375d8d3c269cba1
parent6b754d7bd007c5f68fbb2d9abd5c00d253b033d0
parent82a3aef2e6af2fdd04d542c83b7a35990d94afc9
Merge branch 'devlink-unregister'

Jakub Kicinski says:

====================
devlink: remove the wait-for-references on unregister

Move the registration and unregistration of the devlink instances
under their instance locks. Don't perform the netdev-style wait
for all references when unregistering the instance.

Instead the devlink instance refcount will only ensure that
the memory of the instance is not freed. All places which acquire
access to devlink instances via a reference must check that the
instance is still registered under the instance lock.

This fixes the problem of the netdev code accessing devlink
instances before they are registered.

RFC: https://lore.kernel.org/all/20221217011953.152487-1-kuba@kernel.org/
 - rewrite the cover letter
 - rewrite the commit message for patch 1
 - un-export and rename devl_is_alive
 - squash the netdevsim patches
====================

Signed-off-by: David S. Miller <davem@davemloft.net>