Re: [PATCH] usbip: vudc: Don't enable IRQs prematurely

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

 



On 5/25/22 6:30 AM, Dan Carpenter wrote:
This code does:

	spin_unlock_irq(&udc->ud.lock);
	spin_unlock_irqrestore(&udc->lock, flags);

which does not make sense.  In theory, the first unlock could enable
IRQs and then the second _irqrestore could disable them again.  There
would be a brief momemt where IRQs were enabled improperly.

In real life, however, this function is always called with IRQs enabled
and the bug does not affect runtime.

Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
---
An alternative fix would be to make changes below and also change the
outside _irqsave/_irqrestore() to just _irq().  However, that's more
invasive and riskier with no upside.


Thank you for the patch.

Reviewed-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>

Greg, please pick this up.

thanks,
-- Shuah



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

  Powered by Linux