aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/trigger/stm32-timer-trigger.c
diff options
context:
space:
mode:
authorOkash Khawaja <[email protected]>2017-09-05 11:51:59 +0000
committerGreg Kroah-Hartman <[email protected]>2017-09-18 10:25:31 +0000
commite5f5d0e20b6cecc0ebe6fc8e7df6f8823ad2d594 (patch)
tree807859644cdcbfbdd37853c8e5ec1da741dbd673 /drivers/iio/trigger/stm32-timer-trigger.c
parentstaging: pi433: Move limit check to switch default to kill warning (diff)
downloadkernel-e5f5d0e20b6cecc0ebe6fc8e7df6f8823ad2d594.tar.gz
kernel-e5f5d0e20b6cecc0ebe6fc8e7df6f8823ad2d594.zip
staging: speakup: fix speakup-r empty line lockup
When cursor is at beginning of an empty or whitespace-only line and speakup-r typed, kernel locks up. This happens because deadlock of in input_event function over dev->event_lock, as demonstrated by lockdep logs. The reason for that is speakup simulates a down arrow - because cursor is at an empty line - while inside key press notifier handler which is ultimately triggered from input_event function. The simulated key press leads to input_event being called again, this time under its own context. So the spinlock is dev->event_lock is acquired while still being held. This patch ensures that key press is not simulated from inside key press notifier handler. Instead it delegates to cursor_timer. It starts the timer and passes RA_DOWN_ARROW as argument. When timer handler runs and sees RA_DOWN_ARROW, it will then call kbd_fakekey2(RA_DOWN_ARROW) which will correctly simulate the keypress inside timer context. When not inside key press notifier callback, the behaviour will remain the same as before this patch. Signed-off-by: Okash Khawaja <[email protected]> Reviewed-by: Samuel Thibault <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/iio/trigger/stm32-timer-trigger.c')
0 files changed, 0 insertions, 0 deletions