From 0c0be4e82677a2d8fb49b7a70676bf359e7360b0 Mon Sep 17 00:00:00 2001 From: jake Date: Wed, 22 Nov 2000 07:42:04 +0000 Subject: Protect the following with a lockmgr lock: allproc zombproc pidhashtbl proc.p_list proc.p_hash nextpid Reviewed by: jhb Obtained from: BSD/OS and netbsd --- sys/ia64/ia64/pmap.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys/ia64') diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index b438906..f01064c 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -2244,6 +2244,7 @@ pmap_pid_dump(int pid) struct proc *p; int npte = 0; int index; + lockmgr(&allproc_lock, LK_SHARED, NULL, CURPROC); LIST_FOREACH(p, &allproc, p_list) { if (p->p_pid != pid) continue; @@ -2266,6 +2267,7 @@ pmap_pid_dump(int pid) index = 0; printf("\n"); } + lockmgr(&allproc_lock, LK_RELEASE, NULL, CURPROC); return npte; } pte = pmap_pte_quick( pmap, va); @@ -2290,6 +2292,7 @@ pmap_pid_dump(int pid) } } } + lockmgr(&allproc_lock, LK_RELEASE, NULL, CURPROC); return npte; } #endif -- cgit v1.1