Date: Tue, 7 Sep 2010 00:23:45 +0000 (UTC) From: Ryan Stone <rstone@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/vm vm_mmap.c Message-ID: <201009070023.o870Ntu4066626@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
rstone 2010-09-07 00:23:45 UTC FreeBSD src repository Modified files: sys/vm vm_mmap.c Log: SVN rev 212281 on 2010-09-07 00:23:45Z by rstone In munmap() downgrade the vm_map_lock to a read lock before taking a read lock on the pmc-sx lock. This prevents a deadlock with pmc_log_process_mappings, which has an exclusive lock on pmc-sx and tries to get a read lock on a vm_map. Downgrading the vm_map_lock in munmap allows pmc_log_process_mappings to continue, preventing the deadlock. Without this change I could cause a deadlock on a multicore 8.1-RELEASE system by having one thread constantly mmap'ing and then munmap'ing a PROT_EXEC mapping in a loop while I repeatedly invoked and stopped pmcstat in system-wide sampling mode. Reviewed by: fabient Approved by: emaste (mentor) MFC after: 2 weeks Revision Changes Path 1.245 +11 -3 src/sys/vm/vm_mmap.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009070023.o870Ntu4066626>