]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: ak4117: Do not free priv until timer handler hasn't actually stopped using it
authorKirill Tkhai <ktkhai@parallels.com>
Fri, 14 Feb 2014 11:47:57 +0000 (15:47 +0400)
committerTakashi Iwai <tiwai@suse.de>
Fri, 14 Feb 2014 13:41:52 +0000 (14:41 +0100)
commit2e68294843bb357b6f0e831b084150ab36fd6e13
tree447f055272dd38953873fdf14a86ebdb68c51806
parentdcf2af0f3113e12b2eb8891d135d0ded625949c8
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: Kirill Tkhai <ktkhai@parallels.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/i2c/other/ak4117.c