提交 115b94d5 编写于 作者: K Kirill Tkhai 提交者: Takashi Iwai

ALSA: ak4117: Do not free priv until timer handler hasn't actually stopped using it

Function del_timer() does not guarantee that timer was really deleted.
If the timer handler is beeing executed at the moment, the function
does nothing. So, it's possible to use already freed memory in the handler:

[ref: Documentation/DocBook/kernel-locking.tmpl]

This was found using grep and compile-tested only.
Signed-off-by: NKirill Tkhai <ktkhai@parallels.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 9ce50543
......@@ -62,7 +62,7 @@ static void reg_dump(struct ak4117 *ak4117)
static void snd_ak4117_free(struct ak4117 *chip)
{
del_timer(&chip->timer);
del_timer_sync(&chip->timer);
kfree(chip);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册