summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2014-05-26 19:23:38 +0200
committerBen Hutchings <ben@decadent.org.uk>2014-07-11 13:33:41 +0100
commitab05a2e4be115e07f18152b1569ae8522c4e76a3 (patch)
tree7087a13784b423aa46027a34de033147da0070a1 /mm
parent161427758577d5b5299c0b897730235a1fa950cc (diff)
downloadlwn-ab05a2e4be115e07f18152b1569ae8522c4e76a3.tar.gz
lwn-ab05a2e4be115e07f18152b1569ae8522c4e76a3.zip
USB: cdc-acm: fix broken runtime suspend
commit 140cb81ac8c625942a1d695875932c615767a526 upstream. The current ACM runtime-suspend implementation is broken in several ways: Firstly, it buffers only the first write request being made while suspended -- any further writes are silently dropped. Secondly, writes being dropped also leak write urbs, which are never reclaimed (until the device is unbound). Thirdly, even the single buffered write is not cleared at shutdown (which may happen before the device is resumed), something which can lead to another urb leak as well as a PM usage-counter leak. Fix this by implementing a delayed-write queue using urb anchors and making sure to discard the queue properly at shutdown. Fixes: 11ea859d64b6 ("USB: additional power savings for cdc-acm devices that support remote wakeup") Reported-by: Xiao Jin <jin.xiao@intel.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions