Re: [PATCH 07/12] usb: usbtest: use irqsave() in USB's complete callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-06-25 11:15:06 [-0400], Alan Stern wrote:
> > @@ -1152,9 +1153,9 @@ static void ctrl_complete(struct urb *urb)
> >  
> >  				if (u == urb || !u->dev)
> >  					continue;
> > -				spin_unlock(&ctx->lock);
> > +				spin_unlock_irqrestore(&ctx->lock, flags);
> >  				status = usb_unlink_urb(u);
> > -				spin_lock(&ctx->lock);
> > +				spin_lock_irqsave(&ctx->lock, flags);
> 
> My feeling tends to be that when a lock is temporarily dropped to take 
> a single action like this, there's no need to restore the 
> interrupt-enable flag.  These two calls can remain 
> spin_unlock()/spin_lock().

okay, let me redo this part.

> Aside from this:
> 
> Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> 
> Alan Stern

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux