diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-09 13:14:54 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-09 13:14:54 +0000 |
commit | 8f0cd663e8835f0eef6cbf02adc89ca6c5a5a028 (patch) | |
tree | a531a9546d5de4c678e35744e03d15d9eafecba8 /sys/arch/mvme88k | |
parent | 22b3400dbbcf53ca766905676d927453a6645f85 (diff) |
Nuke evil common, spotted by martin@
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r-- | sys/arch/mvme88k/mvme88k/mem.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/mvme88k/mvme88k/mem.c b/sys/arch/mvme88k/mvme88k/mem.c index 9141ffc37b1..eb0c9b5fa02 100644 --- a/sys/arch/mvme88k/mvme88k/mem.c +++ b/sys/arch/mvme88k/mvme88k/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.23 2007/09/22 16:21:32 krw Exp $ */ +/* $OpenBSD: mem.c,v 1.24 2007/12/09 13:14:53 miod Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -50,7 +50,7 @@ #include <uvm/uvm_extern.h> -caddr_t zeropage; +caddr_t zpage; extern vaddr_t last_addr; /*ARGSUSED*/ @@ -154,11 +154,11 @@ mmrw(dev, uio, flags) * and EFAULT for writes. */ if (uio->uio_rw == UIO_READ) { - if (zeropage == NULL) - zeropage = malloc(PAGE_SIZE, + if (zpage == NULL) + zpage = malloc(PAGE_SIZE, M_TEMP, M_WAITOK | M_ZERO); c = min(c, NBPG - (int)v); - v = (vaddr_t)zeropage; + v = (vaddr_t)zpage; } else #endif return (EFAULT); @@ -180,11 +180,11 @@ mmrw(dev, uio, flags) c = iov->iov_len; break; } - if (zeropage == NULL) - zeropage = malloc(PAGE_SIZE, M_TEMP, + if (zpage == NULL) + zpage = malloc(PAGE_SIZE, M_TEMP, M_WAITOK | M_ZERO); c = min(iov->iov_len, PAGE_SIZE); - error = uiomove(zeropage, c, uio); + error = uiomove(zpage, c, uio); continue; default: |