lkml.org 
[lkml]   [2017]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC] ftrace: Clear hashes of saved init functions
On Sun,  8 Oct 2017 14:33:04 -0700
Joel Fernandes <joelaf@google.com> wrote:

>
> static void
> clear_mod_from_hash(struct ftrace_page *pg, struct ftrace_hash *hash)
> {
> @@ -5771,12 +5807,24 @@ void ftrace_release_mod(struct module *mod)

This is too late. This should be done by ftrace_free_mem().

-- Steve

> {
> struct ftrace_mod_map *mod_map;
> struct ftrace_mod_map *n;
> + struct ftrace_mod_func *mod_func;
> struct dyn_ftrace *rec;
> struct ftrace_page **last_pg;
> struct ftrace_page *tmp_page = NULL;
> struct ftrace_page *pg;
> int order;
>
> + /* mod_map is freed via call_rcu_sched() */
> + preempt_disable();
> + list_for_each_entry_rcu(mod_map, &ftrace_mod_maps, list) {
> + if (mod_map->mod != mod)
> + continue;
> + list_for_each_entry_rcu(mod_func, &mod_map->funcs, list) {
> + clear_mod_func_from_hashes(mod_func);
> + }
> + }
> + preempt_enable();
> +
> mutex_lock(&ftrace_lock);
>
> if (ftrace_disabled)

\
 
 \ /
  Last update: 2017-10-09 17:09    [W:0.077 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site