[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131216175848.GB2007@kroah.com>
Date: Mon, 16 Dec 2013 09:58:48 -0800
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Levente Kurusa <levex@...ux.com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/4] treewide: add missing put_device calls
On Mon, Dec 16, 2013 at 06:18:53PM +0100, Levente Kurusa wrote:
> >> IIRC, there are also a few where the device is also unregistered from
> >> the specific subsystem's core.
> >
> > Do you have a specific example of this? This should happen in the
> > release function of the device already, not in some other code.
> >
> Character drivers who register with device_register() call cdev_del()
> when device_register() fails.
A cdev shouldn't be created until _after_ the device is successfully
registered, as it could be opened and accessed before the device is
registered. That sounds like the drivers that do that should be fixed
(have an example of this somewhere?)
> cdev_del() in turn calls kobject_put on the kobject of the device.
Which device? Don't get confused about the internal kobject for a cdev,
that's a totally different thing.
thanks,
greg k-h
--
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