Please sign in to comment.
Keyboard struct lifetime is easy, but the locking is not and is completely ignored by the existing code. Tackle this one head on - Make the kbd_table private so we can run down all direct users - Hoick the relevant ioctl handlers into the keyboard layer - Lock them with the keyboard lock so they don't change mid keypress - Add helpers for things like console stop/start so we isolate the poking around properly - Tweak the braille console so it still builds There are a couple of FIXME locking cases left for ioctls that are so hideous they should be addressed in a later patch. After this patch the kbd_table is private and all the keyboard jiggery pokery is in one place. This update fixes speakup and also a memory leak in the original. Signed-off-by: Alan Cox <firstname.lastname@example.org> Signed-off-by: Greg Kroah-Hartman <email@example.com>
- Loading branch information...
Showing with 660 additions and 377 deletions.
- +3 −6 drivers/accessibility/braille/braille_console.c
- +4 −4 drivers/staging/speakup/main.c
- +2 −4 drivers/tty/sysrq.c
- +595 −26 drivers/tty/vt/keyboard.c
- +7 −2 drivers/tty/vt/selection.c
- +8 −19 drivers/tty/vt/vt.c
- +17 −308 drivers/tty/vt/vt_ioctl.c
- +1 −6 include/linux/kbd_kern.h
- +0 −2 include/linux/keyboard.h
- +23 −0 include/linux/vt_kern.h
Oops, something went wrong.