Re: [BUGFIX] lockdep: output lock_class key instead of address forforward dependency output

From: Huang, Ying
Date: Fri Jun 13 2008 - 03:24:44 EST


On Fri, 2008-06-13 at 08:58 +0200, Ingo Molnar wrote:
> * Huang, Ying <ying.huang@xxxxxxxxx> wrote:
>
> > The key instead of address of lock_class should be output in
> > /proc/lockdep when forward dependency is output, because key is
> > output for lock_class itself as identifier too.
> >
> > This patch is based on x86/auto-latest branch of git-x86 tree, and has
> > been tested on x86_64 platform.
>
> applied to tip/core/locking - thanks Ying.
>
> i'm wondering, can entry->class never be NULL here?

As far as I know, it can never be NULL. Because entry is added into
class->locks_after in following call chain:

lock_acquire -> __lock_acquire -> validate_chain -> check_prevs_add ->
check_prev_add -> add_lock_to_list

in __lock_acquire the lock_class is look up or registered from
lockdep_map and put in held_lock, which is used in following function in
call chain.

Best Regards,
Huang Ying

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