Commit 56e6aa7f authored by Larry Finger's avatar Larry Finger Committed by Ben Hutchings

rtlwifi: rtl8192cu: Fix kernel deadlock

commit 414b7e3b upstream.

The USB mini-driver in rtlwifi, which is used by rtl8192cu, issues a call to
usb_control_msg() with a timeout value of 0. In some instances where the
interface is shutting down, this infinite wait results in a CPU deadlock. A
one second timeout fixes this problem without affecting any normal operations.

This bug is reported at https://bugzilla.novell.com/show_bug.cgi?id=927786.
Reported-by: default avatarBernhard Wiedemann <bwiedemann@suse.com>
Tested-by: default avatarBernhard Wiedemann <bwiedemann@suse.com>
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Cc: Bernhard Wiedemann <bwiedemann@suse.com>
Cc: Takashi Iwai<tiwai@suse.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
[bwh: Backported to 3.2: adjust context, indentation]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent a1cd4189
...@@ -117,7 +117,7 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request, ...@@ -117,7 +117,7 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request,
reqtype = REALTEK_USB_VENQT_READ; reqtype = REALTEK_USB_VENQT_READ;
status = usb_control_msg(udev, pipe, request, reqtype, value, index, status = usb_control_msg(udev, pipe, request, reqtype, value, index,
pdata, len, 0); /* max. timeout */ pdata, len, 1000);
if (status < 0) if (status < 0)
pr_err("reg 0x%x, usbctrl_vendorreq TimeOut! status:0x%x value=0x%x\n", pr_err("reg 0x%x, usbctrl_vendorreq TimeOut! status:0x%x value=0x%x\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment