Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1350367 > unrolled thread

[PATCH 2.6.32 49/55] ALSA: timer: Fix wrong instance passed to slave callbacks

Started byWilly Tarreau <w@1wt.eu>
First post2016-03-04 17:10 +0100
Last post2016-03-04 17:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2.6.32 49/55] ALSA: timer: Fix wrong instance passed to slave  callbacks Willy Tarreau <w@1wt.eu> - 2016-03-04 17:10 +0100

#1350367 — [PATCH 2.6.32 49/55] ALSA: timer: Fix wrong instance passed to slave callbacks

FromWilly Tarreau <w@1wt.eu>
Date2016-03-04 17:10 +0100
Subject[PATCH 2.6.32 49/55] ALSA: timer: Fix wrong instance passed to slave callbacks
Message-ID<r90sI-Ls-61@gated-at.bofh.it>
2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Takashi Iwai <tiwai@suse.de>

commit 117159f0b9d392fb433a7871426fad50317f06f7 upstream.

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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Willy Tarreau <w@1wt.eu>
---
 sound/core/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/core/timer.c b/sound/core/timer.c
index a0c2684..3141dda 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -409,7 +409,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);
 }
 
-- 
1.7.12.2.21.g234cd45.dirty

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web