Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/vsa Do not expect a struct buf to be present if...
details: https://anonhg.NetBSD.org/src/rev/c761c6e2d85c
branches: trunk
changeset: 970403:c761c6e2d85c
user: ragge <ragge%NetBSD.org@localhost>
date: Sun Mar 22 20:27:47 2020 +0000
description:
Do not expect a struct buf to be present if doing DMA to kernel space.
Fixes bug reported by sadness on port-vax.
diffstat:
sys/arch/vax/vsa/ncr.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 3586e9566595 -r c761c6e2d85c sys/arch/vax/vsa/ncr.c
--- a/sys/arch/vax/vsa/ncr.c Sun Mar 22 20:26:59 2020 +0000
+++ b/sys/arch/vax/vsa/ncr.c Sun Mar 22 20:27:47 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ncr.c,v 1.49 2018/09/03 16:29:28 riastradh Exp $ */
+/* $NetBSD: ncr.c,v 1.50 2020/03/22 20:27:47 ragge Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ncr.c,v 1.49 2018/09/03 16:29:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ncr.c,v 1.50 2020/03/22 20:27:47 ragge Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -275,7 +275,11 @@
dh->dh_flags = SIDH_BUSY;
dh->dh_addr = ncr_sc->sc_dataptr;
dh->dh_len = xlen;
- dh->dh_proc = xs->bp->b_proc;
+ if (((vaddr_t)ncr_sc->sc_dataptr & KERNBASE) == 0) {
+ if (xs->bp == NULL)
+ panic("si_dma_alloc");
+ dh->dh_proc = xs->bp->b_proc;
+ }
/* Remember dest buffer parameters */
if (xs->xs_control & XS_CTL_DATA_OUT)
Home |
Main Index |
Thread Index |
Old Index