From: Greg KH <gregkh@suse.de>
To: Phil Carmody <ext-phil.2.carmody@nokia.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] Kobject: bail early if no new_parent in kobject_move()
Date: Thu, 1 Oct 2009 08:01:05 -0700 [thread overview]
Message-ID: <20091001150105.GA4603@suse.de> (raw)
In-Reply-To: <1254409310.32640.459.camel@pcarmody-desktop>
On Thu, Oct 01, 2009 at 06:01:50PM +0300, Phil Carmody wrote:
> On Thu, 2009-10-01 at 16:49 +0200, ext Greg KH wrote:
> > On Thu, Oct 01, 2009 at 05:50:48PM +0300, Phil Carmody wrote:
> > > From: Phil Carmody <ext-phil.2.carmody@nokia.com>
> > >
> > > In the absense of kobj->kset, new_parent would remain NULL.
> > > NULL-dereference shenanighans then ensues in the subsequent
> > > sysfs_move_dir(..., new_parent) call. Bail early instead.
> >
> > What caller causes this to happen?
>
> It was spotted by static code analysis. If there's no such path,
> then the ``if (kobj->kset)'' condition itself would be unnecessary.
Hm, as there are only 2-3 callers of rename, I guess this isn't that big
of a deal. I'll queue it up for .33.
thanks,
greg k-h
next prev parent reply other threads:[~2009-10-01 15:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-01 14:50 [PATCH 1/1] Kobject: bail early if no new_parent in kobject_move() Phil Carmody
2009-10-01 14:49 ` Greg KH
2009-10-01 15:01 ` Phil Carmody
2009-10-01 15:01 ` Greg KH [this message]
2009-10-05 16:37 ` Cornelia Huck
2009-10-06 8:52 ` Phil Carmody
2009-10-06 13:33 ` Cornelia Huck
2009-10-06 13:33 ` [PATCH] sysfs: Allow sysfs_move_dir(..., NULL) again Cornelia Huck
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=20091001150105.GA4603@suse.de \
--to=gregkh@suse.de \
--cc=ext-phil.2.carmody@nokia.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