tty: moxa: fix TIOCSSERIAL permission check
authorJohan Hovold <johan@kernel.org>
Wed, 7 Apr 2021 10:23:29 +0000 (12:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Apr 2021 15:22:07 +0000 (17:22 +0200)
commitdc8c8437658667be9b11ec25c4b5482ed2becdaa
treed26574381e2d997c7c8b8a3a36949ae66322562a
parent6e70b73ca5240c0059a1fbf8ccd4276d6cf71956
tty: moxa: fix TIOCSSERIAL permission check

Changing the port close delay or type are privileged operations so make
sure to return -EPERM if a regular user tries to change them.

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210407102334.32361-12-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/moxa.c