From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Alexei Starovoitov <ast@fb.com>,
Dave Jones <davej@codemonkey.org.uk>,
Martin KaFai Lau <kafai@fb.com>,
linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] tracing: ignore FTRACE_FL_DISABLED while walking dyn_ftrace records
Date: Mon, 14 Nov 2016 12:30:40 -0800 [thread overview]
Message-ID: <20161114203039.GA1646@ast-mbp.thefacebook.com> (raw)
In-Reply-To: <20161114142428.1091961b@gandalf.local.home>
On Mon, Nov 14, 2016 at 02:24:28PM -0500, Steven Rostedt wrote:
> On Mon, 7 Nov 2016 15:14:20 -0800
> Alexei Starovoitov <ast@fb.com> wrote:
>
> > ftrace_shutdown() checks for sanity of ftrace records
> > and if dyn_ftrace->flags is not zero, it will warn.
> > It can happen that 'flags' are set to FTRACE_FL_DISABLED at this point,
> > since some module was loaded, but before ftrace_module_enable()
> > cleared the flags for this module.
> >
> > In other words the module.c is doing:
> > ftrace_module_init(mod); // calls ftrace_update_code() that sets flags=FTRACE_FL_DISABLED
> > ... // here ftrace_shutdown() is called that warns, since
> > err = prepare_coming_module(mod); // didn't have a chance to clear FTRACE_FL_DISABLED
> >
> > Fix it by ignoring disabled records.
> > It's similar to what __ftrace_hash_rec_update() is already doing.
> >
>
> Alexei,
>
> Do you have a clear reproducer of this bug?
Nope. No reproducer. It's very rare. Only stack trace that I posted earlier.
Since it kills ftrace everything that depends on it later spews a ton
of other warnings. So it's an important fix.
prev parent reply other threads:[~2016-11-14 20:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 23:14 [PATCH] tracing: ignore FTRACE_FL_DISABLED while walking dyn_ftrace records Alexei Starovoitov
2016-11-14 19:24 ` Steven Rostedt
2016-11-14 20:30 ` Alexei Starovoitov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161114203039.GA1646@ast-mbp.thefacebook.com \
--to=alexei.starovoitov@gmail.com \
--cc=ast@fb.com \
--cc=davej@codemonkey.org.uk \
--cc=kafai@fb.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).