Files
linux/drivers/tty
Anton Vasilyev be9a5ecdd4 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-25 09:52:27 +01:00
..
2011-03-31 11:26:23 -03:00
2019-01-31 08:12:35 +01:00
2018-12-01 09:44:25 +01:00
2016-03-07 16:11:14 -08:00
2016-02-14 14:36:04 -08:00