linux-stable/drivers/tty
Anton Vasilyev 73e22730e1 serial: mxs-auart: Fix potential infinite loop
[ Upstream commit 5963e8a312 ]

On the error path of mxs_auart_request_gpio_irq() is performed
backward iterating with index i of enum type. Underline enum type
may be unsigned char. In this case check (--i >= 0) will be always
true and error handling goes into infinite loop.

The patch changes the check so that it is valid for signed and unsigned
types.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-20 18:00:07 +01:00
..
hvc
ipwireless tty: ipwireless: fix missing checks for ioremap 2019-05-31 06:47:32 -07:00
serdev
serial serial: mxs-auart: Fix potential infinite loop 2019-11-20 18:00:07 +01:00
vt tty/vt: fix write/write race in ioctl(KDSKBSENT) handler 2019-05-21 18:50:18 +02:00
amiserial.c
bfin_jtag_comm.c
cyclades.c
ehv_bytechan.c
goldfish.c
isicom.c
Kconfig tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-04-17 08:37:45 +02:00
Makefile
metag_da.c
mips_ejtag_fdc.c
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c
n_hdlc.c tty: n_hdlc: fix build on SPARC 2019-11-06 12:43:09 +01:00
n_null.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c tty: wipe buffer if not echoing data 2018-12-01 09:42:59 +01:00
nozomi.c
pty.c
rocket.c tty: rocket: fix incorrect forward declaration of 'rp_init()' 2019-07-10 09:54:42 +02:00
rocket.h
rocket_int.h
synclink.c
synclink_gt.c
synclinkmp.c
sysrq.c
tty_audit.c
tty_baudrate.c termios, tty/tty_baudrate.c: fix buffer overrun 2018-11-21 09:24:10 +01:00
tty_buffer.c tty: increase the default flip buffer limit to 2*640K 2019-04-05 22:31:37 +02:00
tty_io.c tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-04-17 08:37:45 +02:00
tty_ioctl.c
tty_jobctrl.c
tty_ldisc.c tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-04-17 08:37:45 +02:00
tty_ldsem.c tty/ldsem, locking/rwsem: Add missing ACQUIRE to read_failed sleep loop 2019-08-16 10:13:55 +02:00
tty_mutex.c
tty_port.c tty: do not set TTY_IO_ERROR flag if console port 2018-12-13 09:18:53 +01:00
vcc.c