linux/drivers/tty/vt
Joshua Rogers 38400673c9 vt: stabilize tty reference in kbd_keycode with tty_port_tty_get
commit e25d47a526 upstream.

kbd_keycode() reads vc->port.tty without acquiring a tty reference,
racing against con_shutdown() which clears port.tty under a different
lock. Use tty_port_tty_get()/tty_kref_put() to hold a proper reference
for the duration the tty pointer is needed.

Assisted-by: AISLE:Snapshot
Signed-off-by: Joshua Rogers <linux@joshua.hu>
Cc: stable <stable@kernel.org>
Link: https://patch.msgid.link/20260731-tty-vt-stuff-v1-1-be99b9da8e30@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-08-19 17:14:15 +02:00
..
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
conmakehash.c tty: vt: move conmakehash to drivers/tty/vt/ from scripts/ 2019-12-17 14:42:46 +01:00
consolemap.c tty/vt: consolemap: rename and document struct uni_pagedir 2025-07-10 15:57:36 +02:00
cp437.uni tty: fix up a few remaining files without SPDX identifiers 2019-04-04 18:48:43 +02:00
defkeymap.c_shipped vt: defkeymap: Map keycodes above 127 to K_HOLE 2025-08-28 16:24:27 +02:00
defkeymap.map tty: fix up a few remaining files without SPDX identifiers 2019-04-04 18:48:43 +02:00
keyboard.c vt: stabilize tty reference in kbd_keycode with tty_port_tty_get 2026-08-19 17:14:15 +02:00
Makefile kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
selection.c tty: vt: selection: Correct misspelled function sel_loadlut() 2021-05-20 17:05:33 +02:00
vc_screen.c vc_screen: fix null-ptr-deref in vcs_notifier() during concurrent vcs_write 2026-07-04 13:39:37 +02:00
vt.c vt: add missing notification when switching back to text mode 2025-07-17 18:30:54 +02:00
vt_ioctl.c vt: add permission check for KDSKBMETA ioctl 2026-08-19 17:14:15 +02:00