summaryrefslogtreecommitdiffstats
path: root/Kbuild
diff options
context:
space:
mode:
authorJoel Fernandes <joelaf@google.com>2017-10-09 12:29:31 -0700
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2017-10-10 18:59:16 -0400
commit8715b108cd75523c9b2e833cdcd7aeb363767f95 (patch)
treeb271471dabd42a5e8e46f28099cd270f31938d0b /Kbuild
parentd59158162e032917a428704160a2063a02405ec6 (diff)
downloadop-kernel-dev-8715b108cd75523c9b2e833cdcd7aeb363767f95.zip
op-kernel-dev-8715b108cd75523c9b2e833cdcd7aeb363767f95.tar.gz
ftrace: Clear hashes of stale ips of init memory
Filters should be cleared of init functions during freeing of init memory when the ftrace dyn records are released. However in current code, the filters are left as is. This patch clears the hashes of the saved init functions when the init memory is freed. This fixes the following issue reproducible with the following sequence of commands for a test module: ================================================ void bar(void) { printk(KERN_INFO "bar!\n"); } void foo(void) { printk(KERN_INFO "foo!\n"); bar(); } static int __init hello_init(void) { printk(KERN_INFO "Hello world!\n"); foo(); return 0; } static void __exit hello_cleanup(void) { printk(KERN_INFO "Cleaning up module.\n"); } module_init(hello_init); module_exit(hello_cleanup); ================================================ Commands: echo '*:mod:test' > /d/tracing/set_ftrace_filter echo function > /d/tracing/current_tracer modprobe test rmmod test sleep 1 modprobe test cat /d/tracing/set_ftrace_filter Behavior without patch: Init function is still in the filter Expected behavior: Shouldn't have any of the filters set Link: http://lkml.kernel.org/r/20171009192931.56401-1-joelaf@google.com Signed-off-by: Joel Fernandes <joelaf@google.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud