lkml.org 
[lkml]   [2009]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [tip:tracing/ftrace] tracing: fix oops in tracepoint_update_probe_range()
From
Date
On Wed, 2009-03-18 at 23:08 +0530, Jaswinder Singh Rajput wrote:
> On Wed, 2009-03-18 at 17:33 +0000, Jaswinder Singh Rajput wrote:
> > Commit-ID: 7d1832698e6e422cc2cf0d80b9c50ca567e758a3
> > Gitweb: http://git.kernel.org/tip/7d1832698e6e422cc2cf0d80b9c50ca567e758a3
> > Author: Jaswinder Singh Rajput <jaswinder@kernel.org>
> > AuthorDate: Wed, 18 Mar 2009 22:18:56 +0530
> > Commit: Ingo Molnar <mingo@elte.hu>
> > CommitDate: Wed, 18 Mar 2009 18:30:43 +0100
> >
> > tracing: fix oops in tracepoint_update_probe_range()
> >
> > Change this crash:
> >
> > BUG: unable to handle kernel NULL pointer dereference at (null)
> > IP: [<ffffffff8107d4de>] tracepoint_update_probe_range+0x1f/0x9b
> > PGD 13d5fb067 PUD 13d688067 PMD 0
> > Oops: 0000 [#1] SMP
> >
> > To a more debuggable WARN_ONCE().
> >
> > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > Cc: Frederic Weisbecker <fweisbec@gmail.com>
> > Cc: Steven Rostedt <rostedt@goodmis.org>
> > LKML-Reference: <1237394936.3132.1.camel@localhost.localdomain>
> > [ moved the check outside the lock and added a WARN_ON(). ]
> > Signed-off-by: Ingo Molnar <mingo@elte.hu>
> >
> >
> > ---
> > kernel/tracepoint.c | 9 +++++++--
> > 1 files changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
> > index 7960274..8bc1a06 100644
> > --- a/kernel/tracepoint.c
> > +++ b/kernel/tracepoint.c
> > @@ -272,12 +272,17 @@ static void disable_tracepoint(struct tracepoint *elem)
> > *
> > * Updates the probe callback corresponding to a range of tracepoints.
> > */
> > -void tracepoint_update_probe_range(struct tracepoint *begin,
> > - struct tracepoint *end)
> > +void
> > +tracepoint_update_probe_range(struct tracepoint *begin, struct tracepoint *end)
> > {
> > struct tracepoint *iter;
> > struct tracepoint_entry *mark_entry;
> >
> > + if (!iter) {
> > + WARN_ON_ONCE(1);
> > + goto out;
> > + }
> > +
>
> There is no out, it should be :
>
> + if (!iter) {
> + WARN_ON_ONCE(1);
> + return;
> + }
> +
>

hmm, who is setting iter :p

--
JSR



\
 
 \ /
  Last update: 2009-03-18 18:57    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site