Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> writes: > Regarding [RFC v2 05/10] snet: introduce snet_event > +static rwlock_t snet_evh_lock = __RW_LOCK_UNLOCKED(); > > You can use "static DEFINE_RWLOCK(snet_evh_lock);". > > +int snet_event_is_registered(const enum snet_syscall syscall, const u8 protocol) > > Maybe rcu_read_lock() is better than rw spinlock because this function is > frequently called. here is the patch. thank you Tetsuo >From 34715d4d900aee2d3759e3008313b65dc2f130fd Mon Sep 17 00:00:00 2001 From: Samir Bellabes <sam@xxxxxxxxx> Date: Sat, 6 Mar 2010 15:44:42 +0100 Subject: [PATCH 1/3] snet: use proper rwlock_t declaration Noticed by Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Samir Bellabes <sam@xxxxxxxxx> --- security/snet/snet_event.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/security/snet/snet_event.c b/security/snet/snet_event.c index 9e3f7d2..5f708d0 100644 --- a/security/snet/snet_event.c +++ b/security/snet/snet_event.c @@ -9,7 +9,7 @@ #include "snet_utils.h" static struct list_head *snet_evh; -static rwlock_t snet_evh_lock = __RW_LOCK_UNLOCKED(); +static DEFINE_RWLOCK(snet_evh_lock); struct snet_event_entry { struct list_head list; -- 1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html