]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
USB: CDC-ACM: fix poison/unpoison imbalance
authorOliver Neukum <oneukum@suse.com>
Wed, 21 Apr 2021 07:45:13 +0000 (09:45 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 19 May 2021 08:45:38 +0000 (10:45 +0200)
commit9b5ea55fc53f9b399a12361ac786e470b62e7a17
treee0f210b83f9afb4e23940183bf8f273d67b5a45b
parent4175f24ed2dbb3bff99ca6e07b01715a7860202a
USB: CDC-ACM: fix poison/unpoison imbalance

BugLink: https://bugs.launchpad.net/bugs/1927997
commit a8b3b519618f30a87a304c4e120267ce6f8dc68a upstream.

suspend() does its poisoning conditionally, resume() does it
unconditionally. On a device with combined interfaces this
will balance, on a device with two interfaces the counter will
go negative and resubmission will fail.

Both actions need to be done conditionally.

Fixes: 6069e3e927c8f ("USB: cdc-acm: untangle a circular dependency between callback and softint")
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210421074513.4327-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/usb/class/cdc-acm.c