]> git.baikalelectronics.ru Git - kernel.git/commit
vt: keyboard.c: make console an unsigned int
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Jul 2021 13:43:22 +0000 (15:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jul 2021 10:23:20 +0000 (12:23 +0200)
commit27671213fdbfb6881abc3c0e83c116c4252ea9f7
treec7958e806b0367c8f0fa1c1076fc70a08d207459
parent70712b5ad35c19033d1d44928ddd00c7caf6c612
vt: keyboard.c: make console an unsigned int

The console variable is used everywhere in some fun pointer path and
array indexes and for some reason isn't always declared as unsigned.
This plays havoc with some static analysis tools so mark the variable as
unsigned so we "know" we can not wrap the arrays backwards here.

Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reported-by: Jordy Zomer <jordy@pwning.systems>
Link: https://lore.kernel.org/r/20210726134322.2274919-2-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/keyboard.c
include/linux/vt_kern.h