]> git.baikalelectronics.ru Git - kernel.git/commit
Input: twl6040-vibra - fix NULL pointer dereference by removing workqueue
authorH. Nikolaus Schaller <hns@goldelico.com>
Mon, 18 Apr 2016 21:46:30 +0000 (14:46 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 19 Apr 2016 16:24:19 +0000 (09:24 -0700)
commit1c949b09fde391308ddfd39eae73a9e9c62dd788
tree84114ac3bb8fe9b36f4ff8c40ec812c6f09b1d32
parent0b08c68a21c3baaa3ab1c195e1826e966133388c
Input: twl6040-vibra - fix NULL pointer dereference by removing workqueue

commit fc4cb1e256d8 ("Input: twl6040-vibra - use system workqueue")

says that it switches to use the system workqueue but it did neither

- remove the workqueue struct variable
- replace code to really use the system workqueue

Instead it calls queue_work() on uninitialized info->workqueue.

The result is a NULL pointer dereference in vibra_play().

Solution: use schedule_work

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/twl6040-vibra.c