Re: [PATCH] printk deadlocks if called with runqueue lock held

From: Steven Rostedt
Date: Thu Jan 17 2008 - 20:53:57 EST



On Thu, 17 Jan 2008, Linus Torvalds wrote:

> IOW, I think this should be
>
> if (raw_irqs_disabled_flags(flags) && wake_klogd)
> wake_up_klogd();
>
> Of course, not all architectures seem to suport that thing (it's currently
> only used by the CONFIG_TRACE_IRQFLAGS config option).
>
> Damn. So close, yet so far away.

Perhaps we can define something like:

#ifdef CONFIG_HAS_RAW_IRQS_DISABLED_FLAGS
# define test_irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags)
#else
# define test_irqs_disabled_flags(flags) \
({ (void)flags; irqs_disabled();})
#endif

then we could do

if (test_irqs_disabled_flags(flags) && wake_klogd)
wake_up_klogd();

Or is this asking too much ;-)

-- Steve

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