Re: ALSA bugs with 2.6.12-rc1
From: Takashi Iwai
Date: Mon Apr 04 2005 - 12:27:53 EST
At Mon, 04 Apr 2005 18:08:43 +0100,
Daniel Drake wrote:
>
> David Ford wrote:
> > It seems that 2.6.12-rc1 introduced an ALSA bug generating an oops for a
> > null pointer.
> >
> > codec_semaphore: semaphore is not ready [0x1][0x300300]
> > codec_read 0: semaphore is not ready for register 0x2c
> > Unable to handle kernel NULL pointer dereference at virtual address
> > 00000000
> >
> > This happens on multiple machines, 32b and 64bit. I'll be happy to
> > provide further information if needed.
>
> This only happens when you mismatch your kernel and alsa-lib versions, e.g.
> running alsa-lib-1.0.9-rc2 with alsa-1.0.8 in-kernel drivers, or possibly
> vice-versa.
Only the former case (kernel < lib).
It's already fixed in linux-sound bk tree. The relevant patch is
below. The patch was already submitted to stable, too.
Takashi
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2005/03/22 09:01:11+01:00 perex@xxxxxxx
# [ALSA] Fix Oops with timer notifying
#
# Timer Midlevel
# Fixed Oops with timer notifying after TIMER_TREAD ioctl.
#
# Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
#
# sound/core/timer.c
# 2005/03/15 04:25:51+01:00 perex@xxxxxxx +2 -1
# [ALSA] Fix Oops with timer notifying
#
# D:2005/03/15 11:25:51
# C:Timer Midlevel
# F:core/timer.c:1.65->1.66
# L:Fixed Oops with timer notifying after TIMER_TREAD ioctl.
# Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
#
diff -Nru a/sound/core/timer.c b/sound/core/timer.c
--- a/sound/core/timer.c 2005-04-04 19:25:12 +02:00
+++ b/sound/core/timer.c 2005-04-04 19:25:12 +02:00
@@ -1117,7 +1117,8 @@
if (tu->qused >= tu->queue_size) {
tu->overrun++;
} else {
- memcpy(&tu->queue[tu->qtail++], tread, sizeof(*tread));
+ memcpy(&tu->tqueue[tu->qtail++], tread, sizeof(*tread));
+ tu->qtail %= tu->queue_size;
tu->qused++;
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/