diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-01-19 22:13:37 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-01-22 11:23:19 +0300 |
commit | e9728f0dd7dc06fb0f0d18552ab9599005cd2ab7 (patch) | |
tree | fbbf52c9d3f453c52124a01ff93167d589f5f7a9 /drivers/input/misc/e3x0-button.c | |
parent | 48a55d7de79f95176f3ab372be66165a60be222f (diff) | |
download | linux-e9728f0dd7dc06fb0f0d18552ab9599005cd2ab7.tar.xz |
Input: pwm-beeper - fix race when suspending
Usually userspace sends SND_BELL and SND_TONE events, and by the time
pwm_beeper_suspend() runs userpsace is already frozen, but theoretically
in-kernel users may send these events too, and that may cause
pwm_beeper_event() scheduling another work after we canceled it.
Let's introduce a "suspended" flag and check it in pwm_beeper_event() to
avoid this race.
Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
Tested-by: David Lechner <david@lechnology.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/misc/e3x0-button.c')
0 files changed, 0 insertions, 0 deletions