]> git.ipfire.org Git - people/ms/linux.git/commit
ALSA: ak411x: Fix stall in work callback
authorTakashi Iwai <tiwai@suse.de>
Tue, 13 Jan 2015 09:53:20 +0000 (10:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Feb 2015 06:54:49 +0000 (14:54 +0800)
commit2451dcefc2bcd083460b0e39118a00d940ca6a8a
treec087f02ada39cca3abc64e131e6a2fe6670f1768
parent48e81ac2e37ec765f0885c0acc7b63f91f21da24
ALSA: ak411x: Fix stall in work callback

commit 4161b4505f1690358ac0a9ee59845a7887336b21 upstream.

When ak4114 work calls its callback and the callback invokes
ak4114_reinit(), it stalls due to flush_delayed_work().  For avoiding
this, control the reentrance by introducing a refcount.  Also
flush_delayed_work() is replaced with cancel_delayed_work_sync().

The exactly same bug is present in ak4113.c and fixed as well.

Reported-by: Pavel Hofman <pavel.hofman@ivitera.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Tested-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/sound/ak4113.h
include/sound/ak4114.h
sound/i2c/other/ak4113.c
sound/i2c/other/ak4114.c