Dmitry Torokhov wrote: >> As written above, I think it's better to risk module unload / sysfs race >> than keeping the current sysfs deletion / open race. What do you guys >> think? >> > > How about embedding struct attribute fro devt into struct > [class_]device for now? It is not too big and device is still going to > be pinned into memory while there are sysfs users... I don't like > fattening of device structures but leaks and/or oopses are worse in my > book. Right, your book is apparently much better than mine. Actually, we can just free devt_attr in device_release(). Looking at the code, class device is already doing it that way, so here's the full-assed fix. Chris, can you please test the attached patch? Thanks. -- tejun