lkml.org 
[lkml]   [2012]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH RT 21/25][RFC 3.0.23-rt39-rc1] ring-buffer/rt: Check for irqs disabled before grabbing reader lock
    From: Steven Rostedt <rostedt@goodmis.org>

    In RT the reader lock is a mutex and we can not grab it when preemption is
    disabled. The in_atomic() check that is there does not check if irqs are
    disabled. Add that check as well.

    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    Cc: Carsten Emde <C.Emde@osadl.org>
    Cc: John Kacur <jkacur@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Clark Williams <clark.williams@gmail.com>
    Cc: stable-rt@vger.kernel.org
    Link: http://lkml.kernel.org/r/20120301190345.786365803@goodmis.org
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    ---
    kernel/trace/ring_buffer.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
    index 2467714..2ffbb9d 100644
    --- a/kernel/trace/ring_buffer.c
    +++ b/kernel/trace/ring_buffer.c
    @@ -1045,7 +1045,7 @@ static inline int ok_to_lock(void)
    if (in_nmi())
    return 0;
    #ifdef CONFIG_PREEMPT_RT_FULL
    - if (in_atomic())
    + if (in_atomic() || irqs_disabled())
    return 0;
    #endif
    return 1;
    --
    1.7.8.3



    \
     
     \ /
      Last update: 2012-03-06 18:01    [W:0.022 / U:120.268 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site