Subject: Re: panic: pmap_zero_page: lock botch
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-i386
Date: 03/26/1999 10:24:34
On Fri, 26 Mar 1999 12:06:04 +0100
Manuel Bouyer <bouyer@antioche.eu.org> wrote:
> With a kernel from wenesday sources, I got several panics
> 'pmap_zero_page: lock botch'. I also got a uvm_fault and random core dumps
> of processes. This was under mid-load (6-8 load average, several compilation
> running).
UH.....
pmap_zero_page() and pmap_copy_page() should be going to splimp()!!
Please try the following patch:
-- Jason R. Thorpe <thorpej@nas.nasa.gov>
Index: pmap.new.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/i386/pmap.new.c,v
retrieving revision 1.22
diff -c -r1.22 pmap.new.c
*** pmap.new.c 1999/03/19 05:13:17 1.22
--- pmap.new.c 1999/03/26 18:24:20
***************
*** 2002,2007 ****
--- 2002,2010 ----
paddr_t pa;
{
+ int s;
+
+ s = splimp();
simple_lock(&pmap_zero_page_lock);
#ifdef DIAGNOSTIC
if (*zero_pte)
***************
*** 2013,2018 ****
--- 2016,2022 ----
*zero_pte = 0; /* zap! */
pmap_update_pg((vaddr_t)zerop); /* flush TLB */
simple_unlock(&pmap_zero_page_lock);
+ splx(s);
}
/*
***************
*** 2024,2029 ****
--- 2028,2036 ----
paddr_t srcpa, dstpa;
{
+ int s;
+
+ s = splimp();
simple_lock(&pmap_copy_page_lock);
#ifdef DIAGNOSTIC
if (*csrc_pte || *cdst_pte)
***************
*** 2036,2041 ****
--- 2043,2049 ----
*csrc_pte = *cdst_pte = 0; /* zap! */
pmap_update_2pg((vaddr_t)csrcp, (vaddr_t)cdstp);
simple_unlock(&pmap_copy_page_lock);
+ splx(s);
}
/*