Messages in this thread | | | Subject | Re: [PATCH] Ftrace: irqsoff tracer may cause stack overflow | From | Li Yi <> | Date | Fri, 8 Jan 2010 17:13:15 +0800 |
| |
On Fri, 2010-01-08 at 06:18 +0100, Frederic Weisbecker wrote: > On Fri, Jan 08, 2010 at 12:45:25PM +0800, Li Yi wrote: > > "irqsoff" tracer may cause stack overflow on architectures using > > asm-generic/atomic.h, due to recursive invoking of, e.g. > > trace_hardirqs_off(). > > > > trace_hardirqs_off() -> start_critical_timing() -> atomic_inc() -> > > atomic_add_return() -> local_irq_save() -> trace_hardirqs_off() > > > > Signed-off-by: Yi Li <yi.li@analog.com> > > > > Good catch! > > However, may be we should keep the local_irq_save there > and have __raw_atomic_* versions only for tracing. > > It's better to keep track of most irq disabled sites. > > Why not something like the following (untested): Yes. I agree this is better solution.
-Yi
| |