* [BUG] tty: sysrq: duplicate input handler registration on v7.4-rc5
@ 2026-12-02 8:18 Rahul Priolkar
0 siblings, 0 replies; only message in thread
From: Rahul Priolkar @ 2026-12-02 8:18 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, linux-kernel, Dmitry Torokhov, linux-input
Hello,
On Linux v7.4-rc5 (fe6ff8d5d675), we observed duplicate entries for
the SysRq input handler on a defconfig-based x86_64 guest. In each
trial, we updated kernel.sysrq and checked /proc/bus/input/handlers
for exactly one SysRq entry. With concurrent updates, the handler
appeared 60 times in one listing after 98 trials. Updating kernel.sysrq
requires root in the initial user namespace.
Our reading of drivers/tty/sysrq.c is that sysrq_toggle_support() can
register the static handler twice because the enable-state check and
registration are not serialized. Does that match your understanding of
the failure?
A debug build with DEBUG_LIST and BUG_ON_DATA_CORRUPTION stopped in
the first run. The relevant frames were:
kernel BUG at lib/list_debug.c:37!
RIP: 0010:__list_add_valid_or_report
input_register_handler
sysrq_register_handler
sysrq_sysctl_handler
On the unmodified kernel, we ran the updates one at a time as a
control. All 3,000 trials showed exactly one handler entry. We then
tested an rc5 build that included a mutex around sysrq_toggle_support()
along with our other candidate fixes. Across 6,000 concurrent-update
trials, we saw no duplicate entries or kernel warnings. I can share
the candidate patch if useful.
Thanks,
Rahul Priolkar
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-02 8:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 8:18 [BUG] tty: sysrq: duplicate input handler registration on v7.4-rc5 Rahul Priolkar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.