linux-stable/drivers/usb/class
Johan Hovold dd5619582d USB: cdc-acm: fix unprivileged TIOCCSERIAL
TIOCSSERIAL is a horrid, underspecified, legacy interface which for most
serial devices is only useful for setting the close_delay and
closing_wait parameters.

A non-privileged user has only ever been able to set the since long
deprecated ASYNC_SPD flags and trying to change any other *supported*
feature should result in -EPERM being returned. Setting the current
values for any supported features should return success.

Fix the cdc-acm implementation which instead indicated that the
TIOCSSERIAL ioctl was not even implemented when a non-privileged user
set the current values.

Fixes: ba2d8ce9db ("cdc-acm: implement TIOCSSERIAL to avoid blocking close(2)")
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210408131602.27956-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:08:27 +02:00
..
cdc-acm.c USB: cdc-acm: fix unprivileged TIOCCSERIAL 2021-04-09 16:08:27 +02:00
cdc-acm.h usb: cdc-acm: fix cooldown mechanism 2020-10-28 13:20:21 +01:00
cdc-wdm.c USB: cdc-wdm: Fix use after free in service_outstanding_interrupt(). 2020-12-28 15:44:23 +01:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile USB: add SPDX identifiers to all remaining Makefiles 2017-11-07 15:53:48 +01:00
usblp.c USB: usblp: fix a hang in poll() if disconnected 2021-03-10 09:36:13 +01:00
usbtmc.c USB: usbtmc: Bump USBTMC_API_VERSION value 2020-12-28 15:50:30 +01:00