1 #ifndef __GENETLINK_WRAPPER_H
2 #define __GENETLINK_WRAPPER_H 1
4 #include_next <linux/genetlink.h>
6 #ifdef CONFIG_PROVE_LOCKING
7 /* No version of the kernel has this function, but our locking scheme depends
8 * on genl_mutex so for clarity we use it where appropriate. */
9 static inline int lockdep_genl_is_held(void)
15 /* This is also not upstream yet. */
16 #ifndef genl_dereference
17 #include <linux/rcupdate.h>
19 #define genl_dereference(p) \
20 rcu_dereference_protected(p, lockdep_genl_is_held())
23 #endif /* linux/genetlink.h wrapper */