linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] fix ftrace initialization issue when a module is loaded
@ 2015-12-25  6:22 Qiu, PeiyangX
  2015-12-25  6:46 ` [PATCH 1/2] ftrace: fix the race between ftrace and insmod Qiu, PeiyangX
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Qiu, PeiyangX @ 2015-12-25  6:22 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar, Rusty Russell; +Cc: linux-kernel, yanmin_zhang

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-01-06  1:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-25  6:22 [PATCH 0/2] fix ftrace initialization issue when a module is loaded Qiu, PeiyangX
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

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).