linux-stable/drivers/usb/class
Matthias Reichl 004b43fdfc USB: cdc-acm: restore capability check order
commit 62d65bdd9d upstream.

commit b401f8c4f4 ("USB: cdc-acm: fix rounding error in TIOCSSERIAL")
introduced a regression by changing the order of capability and close
settings change checks. When running with CAP_SYS_ADMIN setting the
close settings to the values already set resulted in -EOPNOTSUPP.

Fix this by changing the check order back to how it was before.

Fixes: b401f8c4f4 ("USB: cdc-acm: fix rounding error in TIOCSSERIAL")
Cc: Anthony Mallet <anthony.mallet@laas.fr>
Cc: stable <stable@vger.kernel.org>
Cc: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Matthias Reichl <hias@horus.com>
Link: https://lore.kernel.org/r/20200327150350.3657-1-hias@horus.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-01 11:02:14 +02:00
..
cdc-acm.c USB: cdc-acm: restore capability check order 2020-04-01 11:02:14 +02:00
cdc-acm.h USB: cdc-acm: clean up throttle handling 2019-04-29 16:14:41 +02:00
cdc-wdm.c USB: cdc-wdm: fix race between write and disconnect due to flag abuse 2019-08-28 22:48:38 +02:00
Kconfig docs: usb: rename files to .rst and add them to drivers-api 2019-06-20 14:28:36 +02:00
Makefile USB: add SPDX identifiers to all remaining Makefiles 2017-11-07 15:53:48 +01:00
usblp.c USB: usblp: fix use-after-free on disconnect 2019-10-15 20:19:19 +02:00
usbtmc.c Merge 5.3-rc7 into usb-next 2019-09-02 19:31:18 +02:00