On Mon, May 13, 2002 at 01:19:48AM -0700, Greg KH wrote: > On Sun, May 12, 2002 at 03:21:24PM +0200, Manfred Spraul wrote: > > > > I found several SMP and UP locking errors in usb-storage, attached is a > > patch: > > > > Changes: > > * srb->result is a bitfield, several << 1 were missing. > > * further sg[].address conversions. I've added a macro to facilitate > > code sharing between 2.4 and 2.5. What are your plans for that? > > * add scsi_lock calls around midlayer calls, release the lock before > > calling usb functions that might sleep. > > * replace the queue semaphore with a queue spinlocks, queuecommand is > > called from bh context. > > > > I've tried to send the patch to the usb-storage list, but it that list > > is a member-only list. > > > > I've tested the patch with my SaroTech usb disk (bulk device). > > Thanks for doing this, I've been hearing reports that the locking was > not quite correct in the usb-storage driver for quite some time. > > I already submitted the page_address() change to Linus, but the rest of > the patch should apply cleanly. > > Matt, what do you think about the changes?
I happen to prefer semaphores over spinlocks, for no good reason other than
personal preference (and a better sense of when they are safe).
I _think_ the locking changes are okay. Merge away. It's 2.5 anyway....
Matt
--
Matthew Dharm Home: [EMAIL PROTECTED]
Maintainer, Linux USB Mass Storage Driver
You should try to see the techs say "three piece suit".
-- The Chief
User Friendly, 11/23/1997
msg06469/pgp00000.pgp
Description: PGP signature
