USB: dummy-hcd: disable interrupts during req->complete

This patch (as756) fixes a bug in dummy-hcd found by the lockdep
checker. In one of the code paths, the driver did not disable
interrupts before calling a request completion routine.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Alan Stern and committed by Greg Kroah-Hartman b4dbda1a be0c8015

+4 -2
+4 -2
drivers/usb/gadget/dummy_hcd.c
··· 609 609 if (!dum->driver) 610 610 return -ESHUTDOWN; 611 611 612 - spin_lock_irqsave (&dum->lock, flags); 612 + local_irq_save (flags); 613 + spin_lock (&dum->lock); 613 614 list_for_each_entry (req, &ep->queue, queue) { 614 615 if (&req->req == _req) { 615 616 list_del_init (&req->queue); ··· 619 618 break; 620 619 } 621 620 } 622 - spin_unlock_irqrestore (&dum->lock, flags); 621 + spin_unlock (&dum->lock); 623 622 624 623 if (retval == 0) { 625 624 dev_dbg (udc_dev(dum), ··· 627 626 req, _ep->name, _req->length, _req->buf); 628 627 _req->complete (_ep, _req); 629 628 } 629 + local_irq_restore (flags); 630 630 return retval; 631 631 } 632 632