Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/arch/sparc/dev Apply patch (requested by pk):
details: https://anonhg.NetBSD.org/src/rev/315464b78be1
branches: netbsd-1-4
changeset: 470478:315464b78be1
user: he <he%NetBSD.org@localhost>
date: Wed Mar 29 20:32:30 2000 +0000
description:
Apply patch (requested by pk):
Fix a NULL pointer dereference when a zs device interrupts during
autoconfiguration of subdevices (keyboard & mouse).
diffstat:
sys/arch/sparc/dev/zs.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 1c309e9d4c45 -r 315464b78be1 sys/arch/sparc/dev/zs.c
--- a/sys/arch/sparc/dev/zs.c Wed Mar 29 20:22:02 2000 +0000
+++ b/sys/arch/sparc/dev/zs.c Wed Mar 29 20:32:30 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: zs.c,v 1.69.2.1 2000/01/15 16:50:53 he Exp $ */
+/* $NetBSD: zs.c,v 1.69.2.2 2000/03/29 20:32:30 he Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -447,6 +447,7 @@
{
register struct zsc_softc *zsc;
register int unit, rr3, rval, softreq;
+ struct zs_chanstate *cs;
rval = softreq = 0;
for (unit = 0; unit < zs_cd.cd_ndevs; unit++) {
@@ -459,8 +460,10 @@
rval |= rr3;
zsc->zsc_intrcnt.ev_count++;
}
- softreq |= zsc->zsc_cs[0]->cs_softreq;
- softreq |= zsc->zsc_cs[1]->cs_softreq;
+ if ((cs = zsc->zsc_cs[0]) != NULL)
+ softreq |= cs->cs_softreq;
+ if ((cs = zsc->zsc_cs[1]) != NULL)
+ softreq |= cs->cs_softreq;
}
/* We are at splzs here, so no need to lock. */
Home |
Main Index |
Thread Index |
Old Index