Commit 86b1309c7e411b7c25dc0dc7a092582a4d291044
Committed by
Jesse Gross
1 parent
263ba61d3b
Exists in
master
and in
38 other branches
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>
Showing 2 changed files with 11 additions and 0 deletions Side-by-side Diff
include/linux/genetlink.h
net/netlink/genetlink.c
... | ... | @@ -33,6 +33,14 @@ |
33 | 33 | } |
34 | 34 | EXPORT_SYMBOL(genl_unlock); |
35 | 35 | |
36 | +#ifdef CONFIG_PROVE_LOCKING | |
37 | +int lockdep_genl_is_held(void) | |
38 | +{ | |
39 | + return lockdep_is_held(&genl_mutex); | |
40 | +} | |
41 | +EXPORT_SYMBOL(lockdep_genl_is_held); | |
42 | +#endif | |
43 | + | |
36 | 44 | #define GENL_FAM_TAB_SIZE 16 |
37 | 45 | #define GENL_FAM_TAB_MASK (GENL_FAM_TAB_SIZE - 1) |
38 | 46 |