aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2011-11-10 22:14:51 -0500
committerJesse Gross <jesse@nicira.com>2011-12-03 12:35:07 -0500
commit86b1309c7e411b7c25dc0dc7a092582a4d291044 (patch)
treeb2557cbe0441d1d762e87a56e105bff6581c13e9 /net/netlink
parent263ba61d3b19508dfb003c215ec5d23f882b4f87 (diff)
genetlink: Add lockdep_genl_is_held().
Open vSwitch uses genl_mutex locking to protect datapath data-structures like flow-table, flow-actions. Following patch adds lockdep_genl_is_held() which is used for rcu annotation to prove locking. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/genetlink.c8
1 files changed, 8 insertions, 0 deletions
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