Patch for 2.4 USB serial
Pete Zaitcev
zaitcev at redhat.com
Wed Mar 24 03:54:37 UTC 2004
On Tue, 23 Mar 2004 19:23:07 -0800
Greg KH <greg at kroah.com> wrote:
> On Tue, Mar 23, 2004 at 02:31:53PM -0800, Pete Zaitcev wrote:
> >
> > If everything goes well, I will push this to Marcelo for 2.4.27.
>
> Wait, aren't I still the USB serial maintainer? :)
Oh duh, that's right. I just forgot :-)
> > I held back hoping for a backport, but now that I looked even more
> > at it, I think 2.6 gets it wrong, too. It will be a separate work.
>
> How does 2.6 get it wrong?
That's how: I didn't agree with this paragraph:
> > 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,
You cannot just get rid of it if you still want to call component
driver's ->open only once. Something has to count, and reference
counts do not match open counts, so you have to keep a counter for it.
An alternative would be to pass all upper level opens through to
component drivers, which would just push open counts down a level.
IIRC, we did it before, but migrated to the current scheme.
So, the open count stays. Since it stays, it has to be protected.
> How about a patch against a clean 2.4 tree? This is against the latest
> fedora 2.4 kernel, right?
I was going to send it out after 2.4.26, but I can send it now if you
want.
-- Pete
More information about the fedora-devel-list
mailing list