diff options
| author | David S. Miller <davem@davemloft.net> | 2023-01-06 12:56:20 +0000 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2023-01-06 12:56:20 +0000 |
| commit | 6bd4755c7c499dbcef46eaaeafa1a319da583b29 (patch) | |
| tree | 4eb9d0f62f2fd24e44f7e5e83375d8d3c269cba1 /include | |
| parent | sysctl: expose all net/core sysctls inside netns (diff) | |
| parent | netdevsim: move devlink registration under the instance lock (diff) | |
| download | linux-6bd4755c7c499dbcef46eaaeafa1a319da583b29.tar.gz linux-6bd4755c7c499dbcef46eaaeafa1a319da583b29.zip | |
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>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/devlink.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index 6a2e4f21779f..425ecef431b7 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1647,6 +1647,8 @@ static inline struct devlink *devlink_alloc(const struct devlink_ops *ops, return devlink_alloc_ns(ops, priv_size, &init_net, dev); } void devlink_set_features(struct devlink *devlink, u64 features); +int devl_register(struct devlink *devlink); +void devl_unregister(struct devlink *devlink); void devlink_register(struct devlink *devlink); void devlink_unregister(struct devlink *devlink); void devlink_free(struct devlink *devlink); |
