lkml.org 
[lkml]   [2013]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] driver core: fix device_create() error path
On Sun, Dec 08, 2013 at 03:42:33PM +0100, David Herrmann wrote:
> Hi Greg
>
> Ping?

It's in my "todo" queue, don't worry, it's not lost.

> On Thu, Nov 21, 2013 at 8:15 PM, David Herrmann <dh.herrmann@gmail.com> wrote:
> > We call put_device() in the error path, which is fine for dev==NULL.
> > However, in case kobject_set_name_vargs() fails, we have dev!=NULL but
> > device_initialized() wasn't called, yet.

If kobject_set_name_vargs() fails, we have bigger problems than this :)

And I think it's safe for a put_device() on a device that wasn't
initialized(), we just get a warning message if that happens.

Not to say that your patch is wrong, I'll look at it soon, but things
should still recover ok from what I can tell.

Oh, and there's the much-complained about memory leak in
kobject_set_name_vargs() if something goes wrong there as well, I have a
patch sitting in my queue to hopefully fix that up.

thanks,

greg k-h


\
 
 \ /
  Last update: 2013-12-08 16:41    [W:0.106 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site