> > Doesn't sound easy to me.
>
> Ick, that's even messier :(
> In looking at your match, I think we only need the last bit, right? The
> other stuff was formatting cleanup, and code reorg from a first glance.
The first hunk is editor junk, true, sorry.
The rest is essential. That code is shifted around for a reason.
The copy_to_user() must come after the tree has been walked,
because BKL may be dropped that way.
The downside of this is that memory consumption increases
drastically. Worst case is ~900K with GFP_ATOMIC.
If you really want this cleanly you need a lock for the usb device
tree. That however means rewriting a lot of locking in usbcore.
We need to lock the whole tree because not only are the devices
needed and must not be freed, but the tree's topology must
be absolutely preserved while the read is being executed.
Even my patch is theoretically speaking incomplete.
There should be mutual exclusion with usb_device_reset()
and usb_set_configuration().
I am not happy with the whole thing, but something needs
to be done.
Regards
Oliver
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel