On Thu, Jan 19, 2017 at 02:40:54PM -0800, Dmitry Torokhov wrote:
> 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.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torok...@gmail.com>
> ---
>  drivers/input/misc/pwm-beeper.c | 21 ++++++++++++++++++---
>  1 file changed, 18 insertions(+), 3 deletions(-)

Reviewed-by: Thierry Reding <thierry.red...@gmail.com>

Attachment: signature.asc
Description: PGP signature

Reply via email to