Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86b1309c authored by Pravin B Shelar's avatar Pravin B Shelar Committed by Jesse Gross
Browse files

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: default avatarPravin B Shelar <pshelar@nicira.com>
Signed-off-by: default avatarJesse Gross <jesse@nicira.com>
parent 263ba61d
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -85,6 +85,9 @@ enum {
/* All generic netlink requests are serialized by a global lock.  */
/* All generic netlink requests are serialized by a global lock.  */
extern void genl_lock(void);
extern void genl_lock(void);
extern void genl_unlock(void);
extern void genl_unlock(void);
#ifdef CONFIG_PROVE_LOCKING
extern int lockdep_genl_is_held(void);
#endif


#endif /* __KERNEL__ */
#endif /* __KERNEL__ */


+8 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,14 @@ void genl_unlock(void)
}
}
EXPORT_SYMBOL(genl_unlock);
EXPORT_SYMBOL(genl_unlock);


#ifdef CONFIG_PROVE_LOCKING
int lockdep_genl_is_held(void)
{
	return lockdep_is_held(&genl_mutex);
}
EXPORT_SYMBOL(lockdep_genl_is_held);
#endif

#define GENL_FAM_TAB_SIZE	16
#define GENL_FAM_TAB_SIZE	16
#define GENL_FAM_TAB_MASK	(GENL_FAM_TAB_SIZE - 1)
#define GENL_FAM_TAB_MASK	(GENL_FAM_TAB_SIZE - 1)