linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Qiu, PeiyangX" <peiyangx.qiu@intel.com>
To: Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel@vger.kernel.org, yanmin_zhang@linux.intel.com
Subject: [PATCH 0/2] fix ftrace initialization issue when a module is loaded
Date: Fri, 25 Dec 2015 14:22:31 +0800	[thread overview]
Message-ID: <567CE0A7.80605@intel.com> (raw)

When a module is loaded, current ftrace initialization around the new module
has some issues.

1) ftrace might race with insmod: Just after load_module calls
ftrace_module_init to add ftrace records of the module, ftrace_run_update_code
might jump in to change module codes. But load_module calls
complete_formation=>set_section_ro_nx to put the module TEXT attribute to RO.
Then, ftrace_run_update_code triggers ftrace_bug and fails.

2) complete_formation might fail and the module's ftrace records are not
cleaned up.

This patchset fixes above issues.

             reply	other threads:[~2015-12-25  6:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-25  6:22 Qiu, PeiyangX [this message]
2015-12-25  6:46 ` [PATCH 1/2] ftrace: fix the race between ftrace and insmod Qiu, PeiyangX
2015-12-25  7:03 ` Qiu, PeiyangX
2015-12-25  7:03 ` [PATCH 2/2] module: deal with the failure of complete_formation Qiu, PeiyangX
2016-01-06  1:01   ` Steven Rostedt
2016-01-06  1:14     ` Zhang, Yanmin
2016-01-06  1:29       ` Steven Rostedt
2016-01-06  1:48         ` Zhang, Yanmin
2016-01-06  1:53           ` 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=567CE0A7.80605@intel.com \
    --to=peiyangx.qiu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=rusty@rustcorp.com.au \
    --cc=yanmin_zhang@linux.intel.com \
    /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).