diff options
author | dg <dg@FreeBSD.org> | 1995-02-10 22:36:11 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-02-10 22:36:11 +0000 |
commit | 5adebb03cd3b492bbbcc378c0e99a659f66a6e18 (patch) | |
tree | 06db1cc795c3726c69c75b467ec9122a96c20861 /sys/kern/sys_process.c | |
parent | d046e3a75895bd79f463d04e4041bef8c8cae221 (diff) | |
download | FreeBSD-src-5adebb03cd3b492bbbcc378c0e99a659f66a6e18.zip FreeBSD-src-5adebb03cd3b492bbbcc378c0e99a659f66a6e18.tar.gz |
Wire the page table before doing the vm_fault(). Fixes a panic that
happens when using gdb.
Submitted by: John Dyson
Diffstat (limited to 'sys/kern/sys_process.c')
-rw-r--r-- | sys/kern/sys_process.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 692f2c5..e1d643b 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sys_process.c,v 1.7 1994/09/25 19:33:49 phk Exp $ + * $Id: sys_process.c,v 1.8 1995/01/14 13:19:38 bde Exp $ */ #include <sys/param.h> @@ -156,18 +156,14 @@ pwrite (struct proc *procp, unsigned int addr, unsigned int datum) { * Fault the page in... */ - rv = vm_fault (map, pageno, VM_PROT_WRITE, FALSE); + vm_map_pageable(map, (vm_offset_t) vtopte(kva), + (vm_offset_t) vtopte(kva) + PAGE_SIZE, FALSE); + rv = vm_fault(map, pageno, VM_PROT_WRITE|VM_PROT_READ, FALSE); + vm_map_pageable (map, (vm_offset_t) vtopte(kva), + (vm_offset_t) vtopte(kva) + PAGE_SIZE, TRUE); if (rv != KERN_SUCCESS) return EFAULT; - /* - * The page may need to be faulted in again, it seems. - * This covers COW pages, I believe. - */ - - if (!rv) - rv = vm_fault (map, pageno, VM_PROT_WRITE, 0); - /* Find space in kernel_map for the page we're interested in */ rv = vm_map_find (kernel_map, object, off, &kva, PAGE_SIZE, 1); |