lkml.org 
[lkml]   [2010]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    SubjectRe: [RFC v2 00/10] snet: Security for NETwork syscalls
    Date
    Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> 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@synack.fr>
    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@I-love.SAKURA.ne.jp>

    Signed-off-by: Samir Bellabes <sam@synack.fr>
    ---
    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


    \
     
     \ /
      Last update: 2010-03-06 19:19    [W:0.019 / U:0.492 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site