summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@fomichev.me>2025-04-01 09:34:46 -0700
committerJakub Kicinski <kuba@kernel.org>2025-04-03 15:32:08 -0700
commit1901066aab7654f4a225ac29354a564d891d0c1a (patch)
tree31410a6161caafa8353a104d3d33385ce6b43e9a /include
parentb912d599d3d83ff9a2db58c17b5c76429a206db5 (diff)
netdevsim: add dummy device notifiers
In order to exercise and verify notifiers' locking assumptions, register dummy notifiers (via register_netdevice_notifier_dev_net). Share notifier event handler that enforces the assumptions with lock_debug.c (rename and export rtnl_net_debug_event as netdev_debug_event). Add ops lock asserts to netdev_debug_event. Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20250401163452.622454-6-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/netdev_lock.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/netdev_lock.h b/include/net/netdev_lock.h
index 1c0c9a94cc22..c316b551df8d 100644
--- a/include/net/netdev_lock.h
+++ b/include/net/netdev_lock.h
@@ -98,4 +98,7 @@ static inline int netdev_lock_cmp_fn(const struct lockdep_map *a,
&qdisc_xmit_lock_key); \
}
+int netdev_debug_event(struct notifier_block *nb, unsigned long event,
+ void *ptr);
+
#endif