[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1502121618160.16826@pobox.suse.cz>
Date: Thu, 12 Feb 2015 16:22:24 +0100 (CET)
From: Miroslav Benes <mbenes@...e.cz>
To: Jiri Slaby <jslaby@...e.cz>
cc: Josh Poimboeuf <jpoimboe@...hat.com>,
Seth Jennings <sjenning@...hat.com>,
Jiri Kosina <jkosina@...e.cz>,
Vojtech Pavlik <vojtech@...e.cz>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
live-patching@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed
On Tue, 10 Feb 2015, Jiri Slaby wrote:
> 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?
And if that attribute is <enabled> it can lead even to the deadlock. You
can try it yourself with the patchset applied and lockdep on. Simple
series of insmod, disable and rmmod of the patch.
Just for the sake of completeness...
Miroslav
>
> > --- 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;
> > }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists