Date: Fri, 28 May 2010 12:05:56 +0000 (UTC) From: "Jayachandran C." <jchandra@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r208616 - head/sys/mips/mips Message-ID: <201005281205.o4SC5uPN087602@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jchandra Date: Fri May 28 12:05:56 2010 New Revision: 208616 URL: http://svn.freebsd.org/changeset/base/208616 Log: Fix lock order reversal, unlock page queue and pmap locks before calling uma_zfree(). Also if needed, acquire page queue lock before modifying pte page attributes. Approved by: rrs (mentor) Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Fri May 28 10:51:44 2010 (r208615) +++ head/sys/mips/mips/pmap.c Fri May 28 12:05:56 2010 (r208616) @@ -885,8 +885,12 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_pa /* * If the page is finally unwired, simply free it. */ - pmap_release_pte_page(m); atomic_subtract_int(&cnt.v_wire_count, 1); + PMAP_UNLOCK(pmap); + vm_page_unlock_queues(); + pmap_release_pte_page(m); + vm_page_lock_queues(); + PMAP_LOCK(pmap); return (1); } @@ -1007,9 +1011,14 @@ pmap_alloc_pte_page(pmap_t pmap, unsigne paddr = MIPS_KSEG0_TO_PHYS(va); m = PHYS_TO_VM_PAGE(paddr); + if (!locked) + vm_page_lock_queues(); m->pindex = index; m->valid = VM_PAGE_BITS_ALL; m->wire_count = 1; + if (!locked) + vm_page_unlock_queues(); + atomic_add_int(&cnt.v_wire_count, 1); *vap = (vm_offset_t)va; return (m);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005281205.o4SC5uPN087602>