]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.4.95/usb-cdc-acm-fix-shutdown-and-suspend-race.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.4.95 / usb-cdc-acm-fix-shutdown-and-suspend-race.patch
CommitLineData
e5ccf3ff
GKH
1From ed797074031a37bb9bf4a70952fffc606b77274d Mon Sep 17 00:00:00 2001
2From: Johan Hovold <jhovold@gmail.com>
3Date: Mon, 26 May 2014 19:23:40 +0200
4Subject: USB: cdc-acm: fix shutdown and suspend race
5
6From: Johan Hovold <jhovold@gmail.com>
7
8commit ed797074031a37bb9bf4a70952fffc606b77274d upstream.
9
10We should stop I/O unconditionally at suspend rather than rely on the
11tty-port initialised flag (which is set prior to stopping I/O during
12shutdown) in order to prevent suspend returning with URBs still active.
13
14Fixes: 11ea859d64b6 ("USB: additional power savings for cdc-acm devices
15that support remote wakeup")
16
17Signed-off-by: Johan Hovold <jhovold@gmail.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19
20---
21 drivers/usb/class/cdc-acm.c | 3 +--
22 1 file changed, 1 insertion(+), 2 deletions(-)
23
24--- a/drivers/usb/class/cdc-acm.c
25+++ b/drivers/usb/class/cdc-acm.c
26@@ -1477,8 +1477,7 @@ static int acm_suspend(struct usb_interf
27 if (cnt)
28 return 0;
29
30- if (test_bit(ASYNCB_INITIALIZED, &acm->port.flags))
31- stop_data_traffic(acm);
32+ stop_data_traffic(acm);
33
34 return 0;
35 }