From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933441AbbCDI7X (ORCPT ); Wed, 4 Mar 2015 03:59:23 -0500 Received: from cantor2.suse.de ([195.135.220.15]:48964 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754305AbbCDI7U (ORCPT ); Wed, 4 Mar 2015 03:59:20 -0500 Date: Wed, 4 Mar 2015 10:00:04 +0100 From: Petr Mladek To: Josh Poimboeuf Cc: Seth Jennings , Jiri Kosina , Vojtech Pavlik , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Rusty Russell , Miroslav Benes , Masami Hiramatsu , mingo@kernel.org, mathieu.desnoyers@efficios.com, oleg@redhat.com, paulmck@linux.vnet.ibm.com, andi@firstfloor.org, rostedt@goodmis.org, tglx@linutronix.de Subject: Re: [PATCH 1/2] livepatch: remove unnecessary call to klp_find_object_module() Message-ID: <20150304090004.GC15177@pathway.suse.cz> References: <4bf3b9f8329b0a6b47747ffe5549de34b4be591d.1425423640.git.jpoimboe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4bf3b9f8329b0a6b47747ffe5549de34b4be591d.1425423640.git.jpoimboe@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2015-03-03 17:02:21, Josh Poimboeuf wrote: > klp_find_object_module() is called from both the klp register and enable > paths. Only the call from the register path is necessary because the > module notifier will let us know if the patched module gets loaded or > unloaded. > > Signed-off-by: Josh Poimboeuf Reviewed-by: Petr Mladek Yup, the call is redundant. Best Regards, Petr > --- > kernel/livepatch/core.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > index 01ca088..a74e4e8 100644 > --- a/kernel/livepatch/core.c > +++ b/kernel/livepatch/core.c > @@ -541,8 +541,6 @@ static int __klp_enable_patch(struct klp_patch *patch) > pr_notice("enabling patch '%s'\n", patch->mod->name); > > for (obj = patch->objs; obj->funcs; obj++) { > - klp_find_object_module(obj); > - > if (!klp_is_object_loaded(obj)) > continue; > > -- > 2.1.0 >