On Thu, 14 Aug 2003, David Brownell wrote:
> Alan Stern wrote:
> > The core/message.c file is getting kind of large and unfocussed. Maybe it
> > should be re-factored (so to speak) at some point. Not important for now.
>
> That issue seems orthogonal to this patch -- I don't think it
> made the problem worse.
Yes and yes. I was just making a general comment about the state of that
file.
> Should the usb_{enable,disable}_*() internal routines (and their
> callers) maybe move into "usb.c" or "hcd.c"? They're "special"
> since they maintain usbcore state (including HCD state). The others
> are just convenience/utility code, wrapping "core" functionality.
Eventually they probably should move. Maybe hcd.c isn't the right place,
since it deals with a lot of lower-level things. On the other hand usb.c
is getting a little unwieldy also, but it seems to me like the best
option. Maybe it should be split into routines for managing devices vs.
everything else.
> > I foresee races between set_bConfigurationValue() and disconnect. But
> > that's not something I can fix in two minutes.
>
> Could you elaborate? I don't think I added any new races there.
Maybe not, but perhaps you exacerbated an existing race. I'm not sure; I
haven't examined the code interactions in detail.
This is a problem generic to sysfs attribute files: They can persist and
be writeable long after you want them to go away. If a user process has
an attribute file open, then calling device_remove_file() won't prevent
the show() and store() routines from being invoked. (I have a patch for
sysfs that would prevent that, but nobody seems interested in it.) If
someone tries to write the config value for a usb_device after it has
disconnected and much of its state has gone away, what will happen?
Alan Stern
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel