tty/vt: prevent registration of console with invalid number
authorSven Schnelle <svens@linux.ibm.com>
Fri, 9 Dec 2022 11:27:37 +0000 (12:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jan 2023 14:04:56 +0000 (15:04 +0100)
commit7370a25f9315e732ab7538d6c7e85208176d8fa2
treeed55ba55ea473b35a2072d3a48d57f6a470021dc
parentdb4df8e9d79e7d37732c1a1b560958e8dadfefa1
tty/vt: prevent registration of console with invalid number

If a user specifies an invalid console like 'console=tty3000',
the vt driver should prevent setting up a vt entry for that.

Suggested-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Link: https://lore.kernel.org/r/20221209112737.3222509-3-svens@linux.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c