usbip: vudc: Don't enable IRQs prematurely
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 25 May 2022 12:30:13 +0000 (15:30 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 09:48:19 +0000 (11:48 +0200)
commit62e4efe3375eb30292dabaec4481dc04550d3644
treee31a2c9d1c0e37949478271c932f2bdec013b485
parentecf6dedd03b03f05459c3662d9b141bedbc1c39d
usbip: vudc: Don't enable IRQs prematurely

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.

Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/Yo4hVWcZNYzKEkIQ@kili
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usbip/vudc_sysfs.c