linux-stable/drivers/usb/class
Matthias Reichl 7b27dd6fbf 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-02 15:28:20 +02:00
..
cdc-acm.c USB: cdc-acm: restore capability check order 2020-04-02 15:28:20 +02:00
cdc-acm.h cdc-acm: fix abnormal DATA RX issue for Mediatek Preloader. 2019-01-09 17:38:45 +01:00
cdc-wdm.c cdc-wdm: pass return value of recover_from_urb_loss 2020-01-27 14:50:24 +01:00
Kconfig
Makefile
usblp.c USB: usblp: fix use-after-free on disconnect 2019-10-29 09:19:46 +01:00
usbtmc.c usb: usbtmc: uninitialized symbol 'actual' in usbtmc_ioctl_clear 2019-11-20 18:47:53 +01:00