Re: [PATCH 1/2] mmiotrace: fix buffer overrun detection

From: Pekka Paalanen
Date: Tue Nov 25 2008 - 12:13:48 EST


On Tue, 25 Nov 2008 12:59:22 +0100
"Frédéric Weisbecker" <fweisbec@xxxxxxxxx> wrote:

> 2008/11/25 Frédéric Weisbecker <fweisbec@xxxxxxxxx>:
> > Perhaps that:
> >
> > int trace_vprintk(unsigned long ip, const char *fmt, va_list args)
> > {
> > ......
> > if (tracing_disabled)
> > return 0;
>
> Since this is the return value for tracing_mark_write(), it may better
> return an error to avoid a spin when tracing
> is disabled. -ENODEV I guess, or -EBUSY
>
> The strange thing is that tracing_open_generic() shoud have return
> -ENODEV in this case during the opening of trace_mark.
>

This sounds worth investigating, thanks for the tip.
Hmm, maybe if I changed the current tracer while trace_enabled was
zero...

Anyway, this isn't too high on my priority list.

--
Pekka Paalanen
http://www.iki.fi/pq/
--
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/