[PATCH 2/2] Input: fix use-after-free introduced with dynamic minor changes

2012-10-21 Thread Dmitry Torokhov
Commit 7f8d4cad1e4e11a45d02bd6e024cc2812963c38a 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 tha

[PATCH 2/2] Input: fix use-after-free introduced with dynamic minor changes

2012-10-21 Thread Dmitry Torokhov
Commit 7f8d4cad1e4e11a45d02bd6e024cc2812963c38a 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 tha