From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758066AbcBDPVZ (ORCPT ); Thu, 4 Feb 2016 10:21:25 -0500 Received: from mx2.suse.de ([195.135.220.15]:53206 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751563AbcBDPVY (ORCPT ); Thu, 4 Feb 2016 10:21:24 -0500 Date: Thu, 4 Feb 2016 16:21:20 +0100 From: Petr Mladek To: Steven Rostedt Cc: Jessica Yu , Josh Poimboeuf , Seth Jennings , Jiri Kosina , Vojtech Pavlik , Miroslav Benes , Rusty Russell , Ingo Molnar , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] ftrace/module: remove ftrace module notifier Message-ID: <20160204152120.GA3305@pathway.suse.cz> References: <1454375856-27757-1-git-send-email-jeyu@redhat.com> <1454375856-27757-2-git-send-email-jeyu@redhat.com> <20160204132751.GY3305@pathway.suse.cz> <20160204091801.1ca8f81e@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160204091801.1ca8f81e@gandalf.local.home> 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 Thu 2016-02-04 09:18:01, Steven Rostedt wrote: > On Thu, 4 Feb 2016 14:27:51 +0100 > Petr Mladek wrote: > > > > > + ftrace_module_enable(mod); > > > blocking_notifier_call_chain(&module_notify_list, > > > MODULE_STATE_COMING, mod); > > > return 0; > > > > Also we need to call ftrace_release_mod() in bug_cleanup: > > goto target in load_module(). Otherwise, it will stay > > enabled when, e.g. parse_args() fails. > > Look farther down (after free_module:), it's already there. Ah, I see. ftrace_release_mod() is called there on an unexpected location. Error paths typically do actions in the reverse order in compare with the normal paths :-) Thanks for the pointer, Petr