Re: [PATCH 0/2] printk vs rq->lock and xtime lock

From: Linus Torvalds
Date: Fri Aug 08 2008 - 13:49:37 EST




On Fri, 8 Aug 2008, Peter Zijlstra wrote:
> +
> + local_irq_save(flags);
> + kws = &__get_cpu_var(kws);
> + if (!kws->pending) {
> + call_rcu(&kws->head, __wake_up_klogd);
> + kws->pending = 1;

In case we have a recursive oops in the RCU paths, I'd think we'd be
*much* better off with

if (!kws->pending) {
kws->pending = 1;
call_rcu(&kws->head, __wake_up_klogd);
}

in order to not re-enter the RCU paths again and causing endless oopses
along with list corruption.

Hmm?

Oh, and I don't see the point of the irqsave/restore in __wake_up_klogd().
Or the BUG_ON(), for that matter (even if it ever were to trigger, we'd be
better off _not_ triggering it - I agree with it in a "verifying the new
implementation works at all" sense, but not in a "this is actually for
merging" kind of patch).

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