linux/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 Input: use module_pci_driver 2012-04-21 23:48:58 -07:00
joystick Merge branch 'next' into for-linus 2012-07-24 22:43:04 -07:00
keyboard Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2012-10-13 10:56:03 +09:00
misc Merge branch 'next' into for-linus 2012-10-11 00:45:21 -07:00
mouse Merge branch 'next' into for-linus 2012-10-11 00:45:21 -07:00
serio ARM: soc: general cleanups 2012-10-01 18:19:05 -07:00
tablet Merge branch 'next' into for-linus 2012-10-11 00:45:21 -07:00
touchscreen Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2012-10-13 10:56:03 +09:00
Kconfig Input: matrix-keymap - uninline and prepare for device tree support 2012-05-10 22:38:47 -07:00
Makefile Input: matrix-keymap - uninline and prepare for device tree support 2012-05-10 22:38:47 -07:00
apm-power.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00
evbug.c Input: use pr_fmt and pr_<level> 2010-11-30 23:10:26 -08:00
evdev.c Input: fix use-after-free introduced with dynamic minor changes 2012-10-22 08:50:37 +03:00
ff-core.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00
ff-memless.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00
input-compat.c compat: Use COMPAT_USE_64BIT_TIME in the input subsystem 2012-02-20 12:48:47 -08:00
input-compat.h compat: Use COMPAT_USE_64BIT_TIME in the input subsystem 2012-02-20 12:48:47 -08:00
input-mt.c Input: MT - Allow legacy pressure computation 2012-09-19 19:50:19 +02:00
input-polldev.c Merge commit 'v3.2-rc3' into next 2011-11-29 01:51:07 -08:00
input.c Input: extend the number of event (and other) devices 2012-10-08 09:37:55 -07:00
joydev.c Input: fix use-after-free introduced with dynamic minor changes 2012-10-22 08:50:37 +03:00
matrix-keymap.c Input: matrix-keymap - fix building keymaps 2012-05-24 01:12:20 -07:00
mousedev.c Input: fix use-after-free introduced with dynamic minor changes 2012-10-22 08:50:37 +03:00
sparse-keymap.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00