From: Takashi Iwai Date: Tue, 13 Jan 2015 09:53:20 +0000 (+0100) Subject: ALSA: ak411x: Fix stall in work callback X-Git-Tag: v3.2.68~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c8edb8faee3068348fa040c22568f132e3643fa;p=pandora-kernel.git 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 Acked-by: Jaroslav Kysela Tested-by: Pavel Hofman Signed-off-by: Takashi Iwai [bwh: Backported to 3.2: snd_ak411{3,4}_reinit were previously using flush_delayed_work_sync() rather than flush_delayed_work()] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed