-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 9 Oct 2002 09:12, Oliver Neukum wrote:
> Hi,
>
> this code
> int usb_unlink_urb(struct urb *urb)
> {
>       if (urb && urb->dev && urb->dev->bus && urb->dev->bus->op)
>               return urb->dev->bus->op->unlink_urb(urb);
>       else
>               return -ENODEV;
> }
> from usb.c depend on gcc caching urb->dev.
> Is that a valid assumption? It would seem so, but gcc is beyond me.
What happens if it doesn't cache it?
If urb->dev (or urb->dev->bus) can become invalid at any time, then I can't 
think of a safe construct to refer to urb->bus->dev->op. Aren't you always 
going to have some (shrinking) window of race?

Brad

- -- 
http://linux.conf.au. 22-25Jan2003. Perth, Aust. I'm registered. Are you?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9o3GDW6pHgIdAuOMRAon3AKCxzekmY1tZXRxtQybTMwzU61O7KACbB1Qg
fOq4PM3rFWOPALLNMkfEF68=
=ZX84
-----END PGP SIGNATURE-----



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to