From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751103AbcBJMh3 (ORCPT ); Wed, 10 Feb 2016 07:37:29 -0500 Received: from mx2.suse.de ([195.135.220.15]:44583 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750837AbcBJMh2 (ORCPT ); Wed, 10 Feb 2016 07:37:28 -0500 Date: Wed, 10 Feb 2016 13:37:26 +0100 From: Petr Mladek To: Jessica Yu Cc: Josh Poimboeuf , Seth Jennings , Jiri Kosina , Vojtech Pavlik , Miroslav Benes , Rusty Russell , Steven Rostedt , Ingo Molnar , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 2/4] modules: set mod->state to MODULE_STATE_GOING before going notifiers are called Message-ID: <20160210123726.GG3305@pathway.suse.cz> References: <1454993424-31031-1-git-send-email-jeyu@redhat.com> <1454993424-31031-3-git-send-email-jeyu@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454993424-31031-3-git-send-email-jeyu@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 Mon 2016-02-08 23:50:22, Jessica Yu wrote: > In load_module(), the going notifiers are called during error handling when > an error occurs after the coming notifiers have already been called. > However, a module's state is still MODULE_STATE_COMING when the going > notifiers are called in the error path. To be consistent, also set > mod->state to MODULE_STATE_GOING before calling the going notifiers. > > Signed-off-by: Jessica Yu Reviewed-by: Petr Mladek It makes perfect sense to set the state this way. But note that it is only partial win. We still stay in the COMING state when using the other goto targets for the error handling, e.g. bug_cleanup, ddebug_cleanup. I was a bit nervous by such a change at this stage of 4.5 release. I spent quite some time on checking various scenarios and I did not find any problem with it. Best Regards, Petr