summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-02-08 17:36:25 +0100
committerSasha Levin <sasha.levin@oracle.com>2016-03-04 10:18:38 -0500
commit77d0a94d22099cbd8d897ba300f3c7947009e351 (patch)
tree2073ad7665e5b5a454ffb924a1dada06b09c9fc2 /sound/core
parent9107eda04c647aa6e624fb7b344cc473f4e4e4b1 (diff)
downloadlinux-stable-77d0a94d22099cbd8d897ba300f3c7947009e351.tar.gz
linux-stable-77d0a94d22099cbd8d897ba300f3c7947009e351.tar.bz2
linux-stable-77d0a94d22099cbd8d897ba300f3c7947009e351.zip
ALSA: timer: Fix wrong instance passed to slave callbacks
[ Upstream commit 117159f0b9d392fb433a7871426fad50317f06f7 ] In snd_timer_notify1(), the wrong timer instance was passed for slave ccallback function. This leads to the access to the wrong data when an incompatible master is handled (e.g. the master is the sequencer timer and the slave is a user timer), as spotted by syzkaller fuzzer. This patch fixes that wrong assignment. BugLink: http://lkml.kernel.org/r/CACT4Y+Y_Bm+7epAb=8Wi=AaWd+DYS7qawX52qxdCfOfY49vozQ@mail.gmail.com Reported-by: Dmitry Vyukov <dvyukov@google.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 942f36eb6946..2cd7d3a12299 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -415,7 +415,7 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event)
spin_lock_irqsave(&timer->lock, flags);
list_for_each_entry(ts, &ti->slave_active_head, active_list)
if (ts->ccallback)
- ts->ccallback(ti, event + 100, &tstamp, resolution);
+ ts->ccallback(ts, event + 100, &tstamp, resolution);
spin_unlock_irqrestore(&timer->lock, flags);
}