summaryrefslogtreecommitdiff
path: root/drivers/md/dm-switch.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-01-19 11:13:37 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-01-22 00:23:19 -0800
commite9728f0dd7dc06fb0f0d18552ab9599005cd2ab7 (patch)
treefbbf52c9d3f453c52124a01ff93167d589f5f7a9 /drivers/md/dm-switch.c
parent48a55d7de79f95176f3ab372be66165a60be222f (diff)
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/md/dm-switch.c')
0 files changed, 0 insertions, 0 deletions