lkml.org 
[lkml]   [2020]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH tip/core/rcu 14/23] rcutorture: Check for unwatched readers
    Date
    From: "Paul E. McKenney" <paulmck@kernel.org>

    RCU is supposed to be watching all non-idle kernel code and also all
    softirq handlers. This commit adds some teeth to this statement by
    adding a WARN_ON_ONCE().

    Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
    ---
    kernel/rcu/rcutorture.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
    index 37455a1..9c31001 100644
    --- a/kernel/rcu/rcutorture.c
    +++ b/kernel/rcu/rcutorture.c
    @@ -1377,6 +1377,7 @@ static bool rcu_torture_one_read(struct torture_random_state *trsp)
    struct rt_read_seg *rtrsp1;
    unsigned long long ts;

    + WARN_ON_ONCE(!rcu_is_watching());
    newstate = rcutorture_extend_mask(readstate, trsp);
    rcutorture_one_extend(&readstate, newstate, trsp, rtrsp++);
    started = cur_ops->get_gp_seq();
    --
    2.9.5
    \
     
     \ /
      Last update: 2020-06-23 02:38    [W:4.139 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site