lkml.org 
[lkml]   [2007]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] lockdep: lockdep_depth vs. debug_locks Re: [2.6.20] BUG: workqueue leaked lock
    From
    Date
    On Thu, 2007-03-22 at 07:11 +0100, Jarek Poplawski wrote:
    > Here is some joke:
    >
    > [PATCH] lockdep: lockdep_depth vs. debug_locks
    >
    > lockdep really shouldn't be used when debug_locks == 0!

    This happens then lockdep reports a fatal error, at which point
    it will stop tracking locks and leave whatever state was there.

    > Reported-by: Folkert van Heusden <folkert@vanheusden.com>
    > Inspired-by: Oleg Nesterov <oleg@tv-sign.ru>
    > Signed-off-by: Jarek Poplawski <jarkao2@o2.pl>

    This looks sane, thanks for figuring this out.

    Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

    > ---
    >
    > diff -Nurp 2.6.21-rc4-git4-/include/linux/lockdep.h 2.6.21-rc4-git4/include/linux/lockdep.h
    > --- 2.6.21-rc4-git4-/include/linux/lockdep.h 2007-03-20 20:24:17.000000000 +0100
    > +++ 2.6.21-rc4-git4/include/linux/lockdep.h 2007-03-21 22:32:41.000000000 +0100
    > @@ -245,7 +245,7 @@ extern void lock_release(struct lockdep_
    >
    > # define INIT_LOCKDEP .lockdep_recursion = 0,
    >
    > -#define lockdep_depth(tsk) ((tsk)->lockdep_depth)
    > +#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
    >
    > #else /* !LOCKDEP */
    >

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-03-22 08:25    [W:0.020 / U:0.704 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site