kernel_optimize_test/drivers/input
Dmitry Torokhov 4a215aade0 Input: fix use-after-free introduced with dynamic minor changes
Commit 7f8d4cad1e ("Input: extend the number of event (and other)
devices") made evdev, joydev and mousedev to embed struct cdev into
their respective structures representing input devices.

Unfortunately character device structure may outlive the parent
structure unless we do not set it up as parent of character device so
that it will stay pinned until character device is freed.

Also, now that parent structure is pinned while character device exists
we do not need to pin and unpin it every time user opens or closes it.

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-22 08:50:37 +03:00
..
gameport
joystick
keyboard
misc
mouse
serio
tablet
touchscreen
apm-power.c
evbug.c
evdev.c Input: fix use-after-free introduced with dynamic minor changes 2012-10-22 08:50:37 +03:00
ff-core.c
ff-memless.c
input-compat.c
input-compat.h
input-mt.c
input-polldev.c
input.c
joydev.c Input: fix use-after-free introduced with dynamic minor changes 2012-10-22 08:50:37 +03:00
Kconfig
Makefile
matrix-keymap.c
mousedev.c Input: fix use-after-free introduced with dynamic minor changes 2012-10-22 08:50:37 +03:00
sparse-keymap.c