lkml.org 
[lkml]   [2016]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG] Incorrect ordering of klp and ftrace module notifier callbacks
On Thu, 28 Jan 2016, Jessica Yu wrote:

> So it doesn't look like a simple priority tweak will work, since we want a
> ftrace->klp->klp->ftrace ordering from module load->module unload. Perhaps we
> can split the ftrace and klp notifiers into separate coming and going handlers
> with the appropriate priorities set to enforce correct ordering (not terribly
> pretty, but it works). Is there a better solution?

Given the facts that:

- we want the ordering ftrace -> klp for load and klp -> ftrace for
unload

- we already do have separate klp_module_notify_coming() and
klp_module_notify_going(), and klp_module_notify() is just a stub that
decides which one to call

I'd suggest we keep just a single ftrace_module_notify() (with INT_MIN+1,
priority), and then introduce separate notifiers

- klp_module_notify_going() with INT_MIN+2, that triggers action iff
action == MODULE_STATE_GOING

- klp_module_notify_going() with INT_MIN, that triggers action only iff
action == MODULE_STATE_COMING

Thanks,

--
Jiri Kosina
SUSE Labs

\
 
 \ /
  Last update: 2016-01-28 22:41    [W:0.053 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site