lkml.org 
[lkml]   [2008]   [May]   [16]   [last100]   RSS-feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Complete thread (EXPERIMENTAL)
/
DateThu, 15 May 2008 16:20:13 -0700
FromGreg KH <>
SubjectRe: [BUG] mm: bdi: export BDI attributes in sysfs
Digg This
On Thu, May 15, 2008 at 03:05:10PM -0700, Arthur Jones wrote:
Hi Greg, ...

On Thu, May 15, 2008 at 02:02:54PM -0700, Greg KH wrote:
On Thu, May 15, 2008 at 12:54:57PM -0700, Linus Torvalds wrote:


On Thu, 15 May 2008, Miklos Szeredi wrote:

Actually nothing should need protection. The only problem AFAICS is that the device_create()/dev_set_drvdata() interface is racy: somebody can come in after the device has been created but before drvdata has been set, and then we are in trouble.

Well, I'm not sure that the locking should be at that level. Maybe the locking *should* be in the driver that does this. It may need to do other setup too, after all.

Of course, doing a device_create_drvdata() thing might be the right solution, at least part of the time. Greg?

Here's a patch that is build tested only.

Can someone who can reproduce this let me know if it solves the problem?

Yes, this patch survives many power cycles
without hitting the BUG...

Thanks for looking into this...

Great!

Thanks for testing this, I'll clean it up a bit more and send it to Linus later this evening. Gotta go take the kids to swimming lessons...
thanks,

greg k-h



\
ISP Services
Valid XHTML 1.0!\ /
Valid CSS! Last update: 2008-05-16 06:55    [W:0.216 / U:0.050 seconds]
©2003-2005 Jasper Spaans