Files
linux/drivers/tty/serial
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
..
2017-08-28 20:51:19 +02:00
2017-01-27 09:23:36 +01:00
2017-06-20 10:24:15 +08:00
2017-07-30 07:32:32 -07:00
2019-01-13 10:01:01 +01:00
2017-01-27 09:23:36 +01:00