Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753869AbbBJTCj (ORCPT ); Tue, 10 Feb 2015 14:02:39 -0500 Received: from mail-we0-f182.google.com ([74.125.82.182]:42385 "EHLO mail-we0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753468AbbBJTCi (ORCPT ); Tue, 10 Feb 2015 14:02:38 -0500 Message-ID: <54DA55CA.3080408@suse.cz> Date: Tue, 10 Feb 2015 20:02:34 +0100 From: Jiri Slaby User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Josh Poimboeuf , Seth Jennings , Jiri Kosina , Vojtech Pavlik CC: Masami Hiramatsu , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed References: <5a1f98566264a40895704d553e9acf8cfda0659c.1423499826.git.jpoimboe@redhat.com> In-Reply-To: <5a1f98566264a40895704d553e9acf8cfda0659c.1423499826.git.jpoimboe@redhat.com> 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 Content-Length: 1181 Lines: 37 On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: > --- a/kernel/livepatch/core.c > +++ b/kernel/livepatch/core.c ... > @@ -497,10 +500,6 @@ static struct attribute *klp_patch_attrs[] = { > > static void klp_kobj_release_patch(struct kobject *kobj) > { > - /* > - * Once we have a consistency model we'll need to module_put() the > - * patch module here. See klp_register_patch() for more details. > - */ I deliberately let you write the note in there :). What happens when I leave some attribute in /sys open and you remove the module in the meantime? > --- a/kernel/livepatch/transition.c > +++ b/kernel/livepatch/transition.c > @@ -54,6 +54,9 @@ void klp_complete_transition(void) > for (func = obj->funcs; func->old_name; func++) > func->transition = 0; > > + if (klp_universe_goal == KLP_UNIVERSE_OLD) > + module_put(klp_transition_patch->mod); > + > klp_transition_patch = NULL; > } regards, -- js suse labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/