Re: [RFC][PATCH] PM: Warn if interrupts are enabled duringsuspend-resume of sysdevs

From: Ingo Molnar
Date: Sun Apr 05 2009 - 09:52:36 EST



* Rafael J. Wysocki <rjw@xxxxxxx> wrote:

> From: Rafael J. Wysocki <rjw@xxxxxxx>
>
> Sysdev have to be suspended and resumed with interrupts disabled
> and things usually break in a way that's difficult to debug if one
> of sysdev drivers enables interrupts by mistake during suspend or
> resume. Add extra checks that will generate warnings in such
> cases.

no objections - but obviously the real solution would be to finish
PeterZ's "detect assymetric kernel functions" patch:

That patch (Peter posted an initial version of it already on lkml)
works the following way:

the ftrace function-graph-tracer plugin is utilized to instrument
every function call in the kernel. That is extended with the
following check: every function except __lockfunc and __sched
functions must be 'balanced' - i.e. they must enter and exit with
the same IRQ flags, preempt count and lock depth counter.

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/