USB: UHCI: fix IRQ race during initialization
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 22 Jan 2013 16:37:35 +0000 (11:37 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Jan 2013 04:47:43 +0000 (20:47 -0800)
commita94af21f3f1e333efd205a8bfd9a51aaec505d0e
tree2660867ff0e9eb4e832c11debc762c050f6fd4b3
parent1dbcda3ab27031e2b744b1f8ba48370304340519
USB: UHCI: fix IRQ race during initialization

commit 0f815a0a700bc10547449bde6c106051a035a1b9 upstream.

This patch (as1644) fixes a race that occurs during startup in
uhci-hcd.  If the IRQ line is shared with other devices, it's possible
for the handler routine to be called before the data structures are
fully initialized.

The problem is fixed by adding a check to the IRQ handler routine.  If
the initialization hasn't finished yet, the routine will return
immediately.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Don Zickus <dzickus@redhat.com>
Tested-by: "Huang, Adrian (ISS Linux TW)" <adrian.huang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/uhci-hcd.c