diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2005-11-12 03:44:25 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2005-11-12 03:44:25 +0000 |
commit | 375cd270afcb9a9c738768d55f4294b8cbb32edd (patch) | |
tree | d4d0fc94b371f3dfb51698094d125f3601ee4249 /sys | |
parent | 2c8007da4b40d76497f24fc7b90479771a84edb7 (diff) |
Make sure we only touch associated processes of physical buffers.
Okay deraadt@.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/vax/qbus/uda.c | 11 | ||||
-rw-r--r-- | sys/arch/vax/vax/disksubr.c | 5 | ||||
-rw-r--r-- | sys/arch/vax/vsa/ncr.c | 8 |
3 files changed, 13 insertions, 11 deletions
diff --git a/sys/arch/vax/qbus/uda.c b/sys/arch/vax/qbus/uda.c index ae22ee8ffce..cf44553ba3d 100644 --- a/sys/arch/vax/qbus/uda.c +++ b/sys/arch/vax/qbus/uda.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uda.c,v 1.5 2004/07/07 23:10:46 deraadt Exp $ */ +/* $OpenBSD: uda.c,v 1.6 2005/11/12 03:44:24 pedro Exp $ */ /* $NetBSD: uda.c,v 1.36 2000/06/04 06:17:05 matt Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -293,9 +293,9 @@ udago(usc, mxi) * the map again. */ if (sc->sc_inq == 0) { - err = bus_dmamap_load(sc->sc_dmat, mxi->mxi_dmam, - bp->b_data, - bp->b_bcount, bp->b_proc, BUS_DMA_NOWAIT); + err = bus_dmamap_load(sc->sc_dmat, mxi->mxi_dmam, bp->b_data, + bp->b_bcount, (bp->b_flags & B_PHYS ? bp->b_proc : NULL), + BUS_DMA_NOWAIT); if (err == 0) { mscp_dgo(sc->sc_softc, mxi); return; @@ -327,7 +327,8 @@ udaready(uu) int err; err = bus_dmamap_load(sc->sc_dmat, mxi->mxi_dmam, bp->b_data, - bp->b_bcount, bp->b_proc, BUS_DMA_NOWAIT); + bp->b_bcount, (bp->b_flags & B_PHYS ? bp->b_proc : NULL), + BUS_DMA_NOWAIT); if (err) return 0; mscp_dgo(sc->sc_softc, mxi); diff --git a/sys/arch/vax/vax/disksubr.c b/sys/arch/vax/vax/disksubr.c index f313f6a7411..2787d60f0f3 100644 --- a/sys/arch/vax/vax/disksubr.c +++ b/sys/arch/vax/vax/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.23 2005/03/30 07:52:32 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.24 2005/11/12 03:44:24 pedro Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1999/06/30 18:48:06 ragge Exp $ */ /* @@ -319,8 +319,7 @@ disk_reallymapin(bp, map, reg, flag) */ if ((bp->b_flags & B_PHYS) == 0) { pte = kvtopte(addr); - if (p == 0) - p = &proc0; + p = &proc0; } else { pcb = &p->p_addr->u_pcb; pte = uvtopte(addr, pcb); diff --git a/sys/arch/vax/vsa/ncr.c b/sys/arch/vax/vsa/ncr.c index e9532d3369e..e39465d242f 100644 --- a/sys/arch/vax/vsa/ncr.c +++ b/sys/arch/vax/vsa/ncr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ncr.c,v 1.15 2005/08/24 21:01:35 deraadt Exp $ */ +/* $OpenBSD: ncr.c,v 1.16 2005/11/12 03:44:24 pedro Exp $ */ /* $NetBSD: ncr.c,v 1.32 2000/06/25 16:00:43 ragge Exp $ */ /*- @@ -292,6 +292,7 @@ si_dma_alloc(ncr_sc) struct sci_req *sr = ncr_sc->sc_current; struct scsi_xfer *xs = sr->sr_xs; struct si_dma_handle *dh; + struct buf *bp; int xlen, i; #ifdef DIAGNOSTIC @@ -324,8 +325,9 @@ found: dh->dh_flags = SIDH_BUSY; dh->dh_addr = ncr_sc->sc_dataptr; dh->dh_len = xlen; - if (xs->bp) - dh->dh_proc = xs->bp->b_proc; + bp = xs->bp; + if (bp != NULL) + dh->dh_proc = (bp->b_flags & B_PHYS ? bp->b_proc : NULL); else dh->dh_proc = NULL; |