lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 3 May 2019 08:27:16 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     "Tobin C. Harding" <me@...in.cc>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>, cl@...ux.com,
        tycho@...ho.ws, willy@...radead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kobject: clean up the kobject add documentation a bit
 more

On Fri, May 03, 2019 at 11:25:29AM +1000, Tobin C. Harding wrote:
> On Thu, May 02, 2019 at 12:22:24PM +0200, Greg Kroah-Hartman wrote:
> > Commit 1fd7c3b438a2 ("kobject: Improve doc clarity kobject_init_and_add()")
> > tried to provide more clarity, but the reference to kobject_del() was
> > incorrect.  Fix that up by removing that line, and hopefully be more explicit
> > as to exactly what needs to happen here once you register a kobject with the
> > kobject core.
> > 
> > Cc: Tobin C. Harding <tobin@...nel.org>
> > Fixes: 1fd7c3b438a2 ("kobject: Improve doc clarity kobject_init_and_add()")
> > Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > 
> > diff --git a/lib/kobject.c b/lib/kobject.c
> > index 3f4b7e95b0c2..f2ccdbac8ed9 100644
> > --- a/lib/kobject.c
> > +++ b/lib/kobject.c
> > @@ -416,8 +416,12 @@ static __printf(3, 0) int kobject_add_varg(struct kobject *kobj,
> >   *         to this function be directly freed with a call to kfree(),
> >   *         that can leak memory.
> >   *
> > - *         If this call returns successfully and you later need to unwind
> > - *         kobject_add() for the error path you should call kobject_del().
> > + *         If this function returns success, kobject_put() must also be called
> > + *         in order to properly clean up the memory associated with the object.
> > + *
> > + *         In short, once this function is called, kobject_put() MUST be called
> > + *         when the use of the object is finished in order to properly free
> > + *         everything.
> >   */
> >  int kobject_add(struct kobject *kobj, struct kobject *parent,
> >  		const char *fmt, ...)
> 
> Ack! (Do I get to do those :)

Yes you do, thanks, now added to the patch and queued up.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ