linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alexei Starovoitov <ast@kernel.org>
Subject: [PATCH 0/2] [GIT PULL] ftrace: Add more checks to ignore disabled functions
Date: Tue, 15 Nov 2016 09:26:31 -0500	[thread overview]
Message-ID: <20161115142631.724209475@goodmis.org> (raw)


Linus,

Alexei discovered a race condition in modules failing to load that
can cause a ftrace check to trigger and disable ftrace. This is because
of the way modules are registered to ftrace. Their functions are
loaded in the ftrace function tables but set to "disabled" since
they are still in the process of being loaded by the module. After
the module is finished, it calls back into the ftrace infrastructure
to enable it. Looking deeper into the locations that access all the
functions in the table, I found more locations that should ignore
the disabled ones.

Please pull the latest trace-v4.9-rc5 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
trace-v4.9-rc5

Tag SHA1: 0f6a062b1a2a55e2c0f801514e9f8792e4339aef
Head SHA1: 546fece4eae871f033925ccf0ff2b740725ae915


Alexei Starovoitov (1):
      ftrace: Ignore FTRACE_FL_DISABLED while walking dyn_ftrace records

Steven Rostedt (Red Hat) (1):
      ftrace: Add more checks for FTRACE_FL_DISABLED in processing ip records

----
 kernel/trace/ftrace.c | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

             reply	other threads:[~2016-11-15 14:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 14:26 Steven Rostedt [this message]
2016-11-15 14:26 ` [PATCH 1/2] ftrace: Ignore FTRACE_FL_DISABLED while walking dyn_ftrace records Steven Rostedt
2016-11-15 14:26 ` [PATCH 2/2] ftrace: Add more checks for FTRACE_FL_DISABLED in processing ip records Steven Rostedt

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=20161115142631.724209475@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=ast@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=torvalds@linux-foundation.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).