OSDN Git Service

USB: serial: ti_usb_3410_5052: fix TIOCSSERIAL permission check
authorJohan Hovold <johan@kernel.org>
Wed, 7 Apr 2021 10:39:15 +0000 (12:39 +0200)
committerJohan Hovold <johan@kernel.org>
Thu, 8 Apr 2021 07:45:58 +0000 (09:45 +0200)
commitd370c90dcd64e427a79a093a070117a1571d4cd8
tree9bf0f427b6d849d0011043ff21b76fab10a2757c
parent4c47dc2a3a00cb288fc4888691227927430e2683
USB: serial: ti_usb_3410_5052: fix TIOCSSERIAL permission check

Changing the port closing-wait parameter is a privileged operation so
make sure to return -EPERM if a regular user tries to change it.

Cc: stable@vger.kernel.org
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/ti_usb_3410_5052.c