]> git.baikalelectronics.ru Git - kernel.git/commit
serial: return -EINVAL for non-legacy RS485 flags
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 6 Jun 2022 10:04:21 +0000 (13:04 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 11:49:57 +0000 (13:49 +0200)
commit08193ad46ffd6b140f86041a5c5fb88c8ccc8784
tree8eabb46704586aeb0f9d9855fb0f2171289b170d
parent71bc222c52430f21d88231c1ff04de2821dfddd5
serial: return -EINVAL for non-legacy RS485 flags

In order to be add new flags more cleanly and safely, return -EINVAL
from TIOCSRS485 ioctl for the flags bits which are not among the
current legacy ones.

This might cause a regression for userspace as those non-flag bits do
not currently trigger -EINVAL. However, it would only occur if the
userspace is sending garbage bits so perhaps we'll get away with this
change.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220606100433.13793-25-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_core.c