From: Greg Kroah-Hartman Date: Fri, 27 Jun 2014 19:39:51 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.4.96~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c27f04b4bf4ee19fc732941f3119c8bf6f09d758;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: usb-option-fix-runtime-pm-handling.patch --- diff --git a/queue-3.4/series b/queue-3.4/series index ed77eca90d0..80b5e9b497b 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -6,3 +6,4 @@ usb-usbtest-add-a-timeout-for-scatter-gather-tests.patch usb-gadget-rename-config_usb_gadget_pxa25x.patch usb-dwc3-gadget-clear-stall-when-disabling-endpoint.patch usb-ehci-avoid-bios-handover-on-the-hasee-e200.patch +usb-option-fix-runtime-pm-handling.patch diff --git a/queue-3.4/usb-option-fix-runtime-pm-handling.patch b/queue-3.4/usb-option-fix-runtime-pm-handling.patch new file mode 100644 index 00000000000..33b12d71ebd --- /dev/null +++ b/queue-3.4/usb-option-fix-runtime-pm-handling.patch @@ -0,0 +1,53 @@ +From acf47d4f9c39b1cba467aa9442fc2efe0b1da741 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Mon, 26 May 2014 19:23:10 +0200 +Subject: USB: option: fix runtime PM handling + +From: Johan Hovold + +commit acf47d4f9c39b1cba467aa9442fc2efe0b1da741 upstream. + +Fix potential I/O while runtime suspended due to missing PM operations +in send_setup. + +Fixes: 383cedc3bb43 ("USB: serial: full autosuspend support for the +option driver") + +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -1930,6 +1930,7 @@ static int option_send_setup(struct usb_ + struct usb_wwan_port_private *portdata; + int ifNum = serial->interface->cur_altsetting->desc.bInterfaceNumber; + int val = 0; ++ int res; + dbg("%s", __func__); + + if (is_blacklisted(ifNum, OPTION_BLACKLIST_SENDSETUP, +@@ -1945,9 +1946,17 @@ static int option_send_setup(struct usb_ + if (portdata->rts_state) + val |= 0x02; + +- return usb_control_msg(serial->dev, +- usb_rcvctrlpipe(serial->dev, 0), +- 0x22, 0x21, val, ifNum, NULL, 0, USB_CTRL_SET_TIMEOUT); ++ res = usb_autopm_get_interface(serial->interface); ++ if (res) ++ return res; ++ ++ res = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), ++ 0x22, 0x21, val, ifNum, NULL, ++ 0, USB_CTRL_SET_TIMEOUT); ++ ++ usb_autopm_put_interface(serial->interface); ++ ++ return res; + } + + MODULE_AUTHOR(DRIVER_AUTHOR);