mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] driver core: fix device_create() error path
Date: Sun, 8 Dec 2013 07:27:37 -0800	[thread overview]
Message-ID: <20131208152737.GB26218@kroah.com> (raw)
In-Reply-To: <CANq1E4TcjmcPbj2GvgUcXA7_+AaevbMTC6+2CsbrugJjjC755A@mail.gmail.com>

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

  reply	other threads:[~2013-12-08 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-21 19:15 David Herrmann
2013-12-08 14:42 ` David Herrmann
2013-12-08 15:27   ` Greg Kroah-Hartman [this message]
2013-12-09  9:08     ` David Herrmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131208152737.GB26218@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dh.herrmann@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®