diff options
author | Kirill Tkhai <ktkhai@parallels.com> | 2014-02-14 15:47:57 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-14 14:41:52 +0100 |
commit | 115b94d51a3ee1b7dfffa74f77e20cd11da70b91 (patch) | |
tree | 447f055272dd38953873fdf14a86ebdb68c51806 /sound/i2c/other | |
parent | 9ce5054363c6ec7e38d0c6c39bd116ec4f7d6480 (diff) | |
download | linux-next-115b94d51a3ee1b7dfffa74f77e20cd11da70b91.tar.gz |
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>
Diffstat (limited to 'sound/i2c/other')
-rw-r--r-- | sound/i2c/other/ak4117.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c index 40e33c9f2b09..88452e899bd9 100644 --- a/sound/i2c/other/ak4117.c +++ b/sound/i2c/other/ak4117.c @@ -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); } |