Re: [PATCH] driver-core: don't free devt_attr till the device is released

Tejun Heo <[email protected]>
Newsgroups gmane.linux.usb.devel,gmane.linux.kernel
Message-ID <[email protected]>
Kay Sievers wrote:
> On 5/10/07, Tejun Heo <[email protected]> wrote:
>> Currently, devt_attr for the "dev" file is freed immediately on device
>> removal, but if the "dev" sysfs file is open when a device is removed,
>> sysfs will access its attribute structure for further access including
>> close resulting in jumping to garbled address.  Fix it by postponing
>> freeing devt_attr to device release time.
>>
>> Note that devt_attr for class_device is already freed on release.
> 
> Hi Tejun,
> your rework removes the "owner" field from the attributes. I think we
> kept the "dev" and "uevent" attribute as part of "struct device" only
> to be able to assign it the actual owner of the module that has
> created the device. The attribute can probably just live as one
> instance statically in the driver core now?

Yeah, that's -mm and this is for -stable and -22.  For -mm, we can just
make all those attributes static which is the other patch is this
thread.  :-)

-- 
tejun

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.