Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Fix botches in rev 1.185 (kent-audio1 merge) which c...



details:   https://anonhg.NetBSD.org/src/rev/a3f440578bd2
branches:  trunk
changeset: 758897:a3f440578bd2
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Nov 20 18:03:49 2010 +0000

description:
Fix botches in rev 1.185 (kent-audio1 merge) which cause buffer overrun
and "tlb_exception: no copyin/out fault hander" panic in
audio_fill_silence() after audio playback on dreamcast.

The problem is tracked and fix is provieded by Ryo SHIMIZU,
who is the auther of aica(4) audio driver for dreamcast.

diffstat:

 sys/dev/audio.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 7f7a42a54200 -r a3f440578bd2 sys/dev/audio.c
--- a/sys/dev/audio.c   Sat Nov 20 16:12:23 2010 +0000
+++ b/sys/dev/audio.c   Sat Nov 20 18:03:49 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.251 2010/02/24 22:37:56 dyoung Exp $       */
+/*     $NetBSD: audio.c,v 1.252 2010/11/20 18:03:49 tsutsui Exp $      */
 
 /*
  * Copyright (c) 1991-1993 Regents of the University of California.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.251 2010/02/24 22:37:56 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.252 2010/11/20 18:03:49 tsutsui Exp $");
 
 #include "audio.h"
 #if NAUDIO > 0
@@ -2778,8 +2778,8 @@
 
                        /* Clear next block so we keep ahead of the DMA. */
                        used = audio_stream_get_used(&cb->s);
-                       if (used + cc < cb->s.end - cb->s.start)
-                               audio_pint_silence(sc, cb, inp, blksize);
+                       if (used + blksize < cb->s.end - cb->s.start)
+                               audio_pint_silence(sc, cb, cb->s.inp, blksize);
                }
        }
 



Home | Main Index | Thread Index | Old Index