aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/genetlink.h3
-rw-r--r--net/netlink/genetlink.c8
2 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h
index 61549b26ad6f..59311adfb0e0 100644
--- a/include/linux/genetlink.h
+++ b/include/linux/genetlink.h
@@ -85,6 +85,9 @@ enum {
85/* All generic netlink requests are serialized by a global lock. */ 85/* All generic netlink requests are serialized by a global lock. */
86extern void genl_lock(void); 86extern void genl_lock(void);
87extern void genl_unlock(void); 87extern void genl_unlock(void);
88#ifdef CONFIG_PROVE_LOCKING
89extern int lockdep_genl_is_held(void);
90#endif
88 91
89#endif /* __KERNEL__ */ 92#endif /* __KERNEL__ */
90 93
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 8a36599d3555..28453ae2a97b 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -33,6 +33,14 @@ void genl_unlock(void)
33} 33}
34EXPORT_SYMBOL(genl_unlock); 34EXPORT_SYMBOL(genl_unlock);
35 35
36#ifdef CONFIG_PROVE_LOCKING
37int lockdep_genl_is_held(void)
38{
39 return lockdep_is_held(&genl_mutex);
40}
41EXPORT_SYMBOL(lockdep_genl_is_held);
42#endif
43
36#define GENL_FAM_TAB_SIZE 16 44#define GENL_FAM_TAB_SIZE 16
37#define GENL_FAM_TAB_MASK (GENL_FAM_TAB_SIZE - 1) 45#define GENL_FAM_TAB_MASK (GENL_FAM_TAB_SIZE - 1)
38 46