On Fri, Mar 12, 2004 at 08:41:11PM -0800, Pete Zaitcev wrote: > Greg, > > I do not like my monkeying with the helper task, so > I am investigating a backport from 2.6 to 2.4. > > I see that the hateful semaphore is gone. The disconnect is guarged by > a kobject, so this is good. However, what about the port->open_count? > It is manipulated without any locking, it seems.
Actually it can be gotten rid of entirely I think. The reference count of the object is now handled properly, so open_count is pretty much pointless. Now we are still relying on the fact that open() can't race with disconnect() from the USB bus, which in real-life is probably ok, but I'm not so sure anymore in theory due to the BKL removal work in various upper portions of the 2.6 kernel. You should be fine for 2.4 though. Oh, if you want to backport the kobject stuff, I recommend using the kref patch I just sent to lkml instead. It's much simpler and will plop into 2.4 with no problem at all. I've rewritten the usb-skeleton driver to not use any locks or open counts, using krefs and it's a lot easier to read, understand, and is much smaller. I'll get around to posting it here someday soon... Hope this helps, greg k-h ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
