[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a8e1da0801180234k4b48fd1axaba6d7d334219430@mail.gmail.com>
Date: Fri, 18 Jan 2008 18:34:55 +0800
From: "Dave Young" <hidave.darkstar@...il.com>
To: "Cornelia Huck" <cornelia.huck@...ibm.com>
Cc: "Gabor Gombas" <gombasg@...aki.hu>, "Tejun Heo" <htejun@...il.com>,
"Al Viro" <viro@...iv.linux.org.uk>, linux-kernel@...r.kernel.org,
bluez-devel@...ts.sf.net, kay.sievers@...y.org,
"Greg KH" <greg@...ah.com>,
"Marcel Holtmann" <marcel@...tmann.org>, davem@...emloft.net
Subject: Re: [Bluez-devel] Oops involving RFCOMM and sysfs
On Jan 18, 2008 6:23 PM, Cornelia Huck <cornelia.huck@...ibm.com> wrote:
> On Fri, 18 Jan 2008 10:19:33 +0100,
> Cornelia Huck <cornelia.huck@...ibm.com> wrote:
>
> > >
> > > 1314 if (IS_ERR(new_parent_kobj)) {
> > > 1315 error = PTR_ERR(new_parent_kobj);
> > > 1316 put_device(new_parent);
> > > 1317 goto out;
> > > 1318 }
> > > 1319 pr_debug("DEVICE: moving '%s' to '%s'\n", dev->bus_id,
> > > 1320 new_parent ? new_parent->bus_id : "<NULL>");
> > > 1321 error = kobject_move(&dev->kobj, new_parent_kobj);
> > > 1322 if (error) {
> > > 1323 put_device(new_parent);
> > >
> > > imagine new_parent is NULL, then the new_parent_kobj should be put
> >
> > No, we would need a put_device_parent() (crappy name) which puts the
> > reference iff get_device_parent() grabbed it.
>
> And looking at Greg's patchset, it has cleanup_device_parent(), which
> does just that. But it is only called in device_del(), not when
> device_move() has errors.
>
> (get_device_parent() also always returns a pointer to a kobject or
> NULL, so we can get rid of those IS_ERR() checks in setup_parent() and
> device_move() as well.)
>
Hmm, thanks.
I will be offline during weekend, but I will still check the
device_move and other code if I have time.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists