From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754250AbdJIPJq (ORCPT ); Mon, 9 Oct 2017 11:09:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:38950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751581AbdJIPJo (ORCPT ); Mon, 9 Oct 2017 11:09:44 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2C4521928 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Mon, 9 Oct 2017 11:09:42 -0400 From: Steven Rostedt To: Joel Fernandes Cc: linux-kernel@vger.kernel.org, Jessica Yu Subject: Re: [PATCH RFC] ftrace: Clear hashes of saved init functions Message-ID: <20171009110942.731832f4@gandalf.local.home> In-Reply-To: <20171008213304.155783-1-joelaf@google.com> References: <20171008213304.155783-1-joelaf@google.com> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 8 Oct 2017 14:33:04 -0700 Joel Fernandes 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)