Re: [PATCH] lockdep: fix invalid list_del_rcu in zap_class

From: Ingo Molnar
Date: Wed Aug 27 2008 - 02:42:24 EST



* Zhu Yi <yi.zhu@xxxxxxxxx> wrote:

> BUG: unable to handle kernel NULL pointer dereference at
> 0000000000000008
> IP: [<ffffffff810531e1>] zap_class+0x24/0x82

> The root cause for this oops is in add_lock_to_list() when
> save_trace() fails due to MAX_STACK_TRACE_ENTRIES is reached,
> entry->class is assigned but entry is never added into any lock list.
> This makes the list_del_rcu() in zap_class() oops later when the
> module is unloaded. This patch fixes the problem by assigning
> entry->class after save_trace() returns success.

good spotting! Applied to tip/core/urgent, thanks.

Ingo
--
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/