]> git.baikalelectronics.ru Git - 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Apr 2021 08:53:15 +0000 (10:53 +0200)
commit2effaef2396c6d26661edc7a016562f9b1c9df3e
treee010935027f6281e272c859e1a2ae11147b0cddd
parentda2ce788c46106fccc6cab4aa2a3b4c910c1cc63
USB: CDC-ACM: fix poison/unpoison imbalance

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: e23f3924fa0c4 ("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>
drivers/usb/class/cdc-acm.c