Prev: staging: otus: Remove mix of tabs and spaces with just tabs in ioctl.c
Next: [PATCH 3/3] gigaset: prune use of tty_buffer_request_room
From: Steven Rostedt on 14 Mar 2010 18:40 On Sun, 2010-03-14 at 23:05 +0100, John Kacur wrote: > On Sat, Mar 13, 2010 at 3:57 AM, Steven Rostedt <rostedt(a)goodmis.org> wrote: > > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c > > index 484337d..e52683f 100644 > > --- a/kernel/trace/trace.c > > +++ b/kernel/trace/trace.c > > @@ -1284,6 +1284,13 @@ ftrace_trace_userstack(struct ring_buffer *buffer, unsigned long flags, int pc) > > if (!(trace_flags & TRACE_ITER_USERSTACKTRACE)) > > return; > > > > + /* > > + * NMIs can not handle page faults, even with fix ups. > > + * The save user stack can (and often does) fault. > > + */ > > + if (unlikely(in_nmi())) > > + return; > > + > > event = trace_buffer_lock_reserve(buffer, TRACE_USER_STACK, > > sizeof(*entry), flags, pc); > > if (!event) > > -- > > 1.7.0 > > > > That is some awfully cool detective work. Just one question, if it is > so easy to trigger, why did you wrap it in "unlikely"? It was not easy to trigger until I had a case to trigger it. Currently, the only time that this should trigger is for the lockdep tracing, which only happens when lockdep is enabled. Most of the time, this should never trigger. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |