Source-Changes-HG archive

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

[src/netbsd-2-0]: src/sys/arch/hp300/dev Pullup rev 1.26 (requested by tsutsu...



details:   https://anonhg.NetBSD.org/src/rev/f459295979fc
branches:  netbsd-2-0
changeset: 560371:f459295979fc
user:      jmc <jmc%NetBSD.org@localhost>
date:      Sun Apr 11 03:02:54 2004 +0000

description:
Pullup rev 1.26 (requested by tsutsui in ticket #117)

Check mapped device VA by badaddr() in cnattach functions for framebuffers.

diffstat:

 sys/arch/hp300/dev/grf_gb.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 71842106d28e -r f459295979fc sys/arch/hp300/dev/grf_gb.c
--- a/sys/arch/hp300/dev/grf_gb.c       Sun Apr 11 03:02:49 2004 +0000
+++ b/sys/arch/hp300/dev/grf_gb.c       Sun Apr 11 03:02:54 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: grf_gb.c,v 1.25 2003/11/17 14:37:59 tsutsui Exp $      */
+/*     $NetBSD: grf_gb.c,v 1.25.2.1 2004/04/11 03:02:54 jmc Exp $      */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -121,7 +121,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf_gb.c,v 1.25 2003/11/17 14:37:59 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf_gb.c,v 1.25.2.1 2004/04/11 03:02:54 jmc Exp $");
 
 #include "opt_compat_hpux.h"
 
@@ -652,7 +652,8 @@
        va = bus_space_vaddr(bst, bsh);
        grf = (struct grfreg *)va;
 
-       if ((grf->gr_id != GRFHWID) || (grf->gr_id2 != GID_GATORBOX)) {
+       if (badaddr(va) ||
+           (grf->gr_id != GRFHWID) || (grf->gr_id2 != GID_GATORBOX)) {
                bus_space_unmap(bst, bsh, PAGE_SIZE);
                return (1);
        }



Home | Main Index | Thread Index | Old Index