lkml.org 
[lkml]   [2014]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv3 2/3] kernel: add support for live patching
On Fri, 21 Nov 2014, Jiri Kosina wrote:

[...]

> [ ... snip ... ]
> > +static int klp_init_patch(struct klp_patch *patch)
> > +{
> > + int ret;
> > +
> > + mutex_lock(&klp_mutex);
> > +
> > + /* init */
> > + patch->state = LPC_DISABLED;
> > +
> > + /* sysfs */
> > + ret = kobject_init_and_add(&patch->kobj, &klp_ktype_patch,
> > + klp_root_kobj, patch->mod->name);
> > + if (ret)
> > + return ret;
>
> klp_mutex is leaked locked here.
>
> > +
> > + /* create objects */
> > + ret = klp_init_objects(patch);
> > + if (ret) {
> > + kobject_put(&patch->kobj);
> > + return ret;
>
> And here as well.
>
> All in all, this is looking very good to me. I think we are really close
> to having a code that all the parties would agree with. Thanks everybody,

The leaking is my fault. I missed that somehow during rebasing.

Seth, could you please fix it in v4?

Thanks
--
Miroslav Benes
SUSE Labs


\
 
 \ /
  Last update: 2014-11-21 16:21    [W:0.208 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site