Messages in this thread |  | | Date | Tue, 10 Feb 2015 20:02:34 +0100 | From | Jiri Slaby <> | Subject | Re: [RFC PATCH 8/9] livepatch: allow patch modules to be removed |
| |
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
|  |