summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2015-04-24 11:03:37 -0500
committerPeter Wu <peter@lekensteyn.nl>2015-05-27 18:39:22 +0200
commitdb4a27ccd2b9bc922ddf34716180e18620ef0664 (patch)
tree050f4c657ed803cf542ae94173feda8bce5bbf5a
parentcc96dc4d516428501820ecd277ec3fc7ab0d384a (diff)
downloadlinux-db4a27ccd2b9bc922ddf34716180e18620ef0664.tar.gz
rtlwifi: rtl8192cu: Fix kernel deadlock
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: Bernhard Wiedemann <bwiedemann@suse.com> Tested-by: Bernhard Wiedemann <bwiedemann@suse.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Cc: Bernhard Wiedemann <bwiedemann@suse.com> Cc: Takashi Iwai<tiwai@suse.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> (cherry picked from commit 414b7e3b9ce8b0577f613e656fdbc36b34b444dd)
-rw-r--r--drivers/net/wireless/rtlwifi/usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index 46ee956d0235..27cd6cabf6c5 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -126,7 +126,7 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request,
do {
status = usb_control_msg(udev, pipe, request, reqtype, value,
- index, pdata, len, 0); /*max. timeout*/
+ index, pdata, len, 1000);
if (status < 0) {
/* firmware download is checksumed, don't retry */
if ((value >= FW_8192C_START_ADDRESS &&