lkml.org 
[lkml]   [2021]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.13 342/800] lockdep: Fix wait-type for empty stack
    Date
    From: Peter Zijlstra <peterz@infradead.org>

    [ Upstream commit f8b298cc39f0619544c607eaef09fd0b2afd10f3 ]

    Even the very first lock can violate the wait-context check, consider
    the various IRQ contexts.

    Fixes: de8f5e4f2dc1 ("lockdep: Introduce wait-type checks")
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Tested-by: Joerg Roedel <jroedel@suse.de>
    Link: https://lore.kernel.org/r/20210617190313.256987481@infradead.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    kernel/locking/lockdep.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
    index 39b6392b4826..9125bd419216 100644
    --- a/kernel/locking/lockdep.c
    +++ b/kernel/locking/lockdep.c
    @@ -4693,7 +4693,7 @@ static int check_wait_context(struct task_struct *curr, struct held_lock *next)
    u8 curr_inner;
    int depth;

    - if (!curr->lockdep_depth || !next_inner || next->trylock)
    + if (!next_inner || next->trylock)
    return 0;

    if (!next_outer)
    --
    2.30.2


    \
     
     \ /
      Last update: 2021-07-12 10:41    [W:6.582 / U:0.656 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site