Skip to content

Commit

Permalink
usb: wusbcore: convert nested lock to use spin_lock instead of spin_l…
Browse files Browse the repository at this point in the history
…ock_irq

Nesting a spin_lock_irq/unlock_irq inside a lock that has already
disabled interrupts will enable interrupts before we are ready when
spin_unlock_irq is called.  This patch converts the inner lock to use
spin_lock and spin_unlock instead.

Signed-off-by: Thomas Pugliese <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
TomServo3000 authored and gregkh committed Apr 24, 2014
1 parent c996b93 commit 7584f2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/wusbcore/wa-xfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2390,10 +2390,10 @@ static void wa_xfer_result_chew(struct wahc *wa, struct wa_xfer *xfer,
done) {

dev_info(dev, "Control EP stall. Queue delayed work.\n");
spin_lock_irq(&wa->xfer_list_lock);
spin_lock(&wa->xfer_list_lock);
/* move xfer from xfer_list to xfer_errored_list. */
list_move_tail(&xfer->list_node, &wa->xfer_errored_list);
spin_unlock_irq(&wa->xfer_list_lock);
spin_unlock(&wa->xfer_list_lock);
spin_unlock_irqrestore(&xfer->lock, flags);
queue_work(wusbd, &wa->xfer_error_work);
} else {
Expand Down

0 comments on commit 7584f2e

Please sign in to comment.