freebsd-skq/sys/vm
Konstantin Belousov 24bbc85bf6 The behaviour of the lockmgr going back at least to the 4.4BSD-Lite2 was
to downgrade the exclusive lock to shared one when exclusive lock owner
requested shared lock. New lockmgr panics instead.

The vnode_pager_lock function requests shared lock on the vnode backing
the OBJT_VNODE, and can be called when the current thread already holds
an exlcusive lock on the vnode. For instance, it happens when handling
page fault from the VOP_WRITE() uiomove that writes to the file, with
the faulted in page fetched from the vm object backed by the same file.
We then get the situation described above.

Verify whether the vnode is already exclusively locked by the curthread
and request recursed exclusive vnode lock instead of shared, if true.

Reported by:	gallatin
Discussed with:	attilio
2008-07-30 18:16:06 +00:00
..
default_pager.c
device_pager.c Preset a device object's alignment ("pg_color") based upon the 2008-05-17 16:26:34 +00:00
memguard.c Provide the new argument to kmem_suballoc(). 2008-05-10 23:39:27 +00:00
memguard.h Improve memguard a bit: 2005-12-30 11:45:07 +00:00
phys_pager.c Correct a copy and paste'o in phys_pager.c, we are talking about phys here 2007-10-30 14:48:13 +00:00
pmap.h Retire pmap_addr_hint(). It is no longer used. 2008-05-18 04:16:57 +00:00
redzone.c Modify stack(9) stack_print() and stack_sbuf_print() routines to use new 2007-12-01 22:04:16 +00:00
redzone.h Add buffer corruption protection (RedZone) for kernel's malloc(9). 2006-01-31 11:09:21 +00:00
swap_pager.c Use the VM_ALLOC_INTERRUPT for the page requests when allocating memory 2008-07-11 11:27:42 +00:00
swap_pager.h - Move 'struct swdevt' back into swap_pager.h and expose it to userland. 2007-02-07 17:43:11 +00:00
uma_core.c Reintroduce UMA_SLAB_KMAP; however, change its spelling to 2008-04-04 18:41:12 +00:00
uma_dbg.c Improve canonicalization of copyrights. Order copyrights by order of 2005-07-16 09:51:52 +00:00
uma_dbg.h Improve canonicalization of copyrights. Order copyrights by order of 2005-07-16 09:51:52 +00:00
uma_int.h Update stale comment on protecting UMA per-CPU caches: we now use 2007-05-09 22:53:34 +00:00
uma.h Reintroduce UMA_SLAB_KMAP; however, change its spelling to 2008-04-04 18:41:12 +00:00
vm_contig.c VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in 2008-01-13 14:44:15 +00:00
vm_extern.h Introduce a new parameter "superpage_align" to kmem_suballoc() that is 2008-05-10 21:46:20 +00:00
vm_fault.c Simplify the inner loop of vm_fault()'s delete-behind heuristic. 2008-03-16 17:37:19 +00:00
vm_glue.c - Make SCHED_STATS more generic by adding a wrapper to create the 2008-04-17 04:20:10 +00:00
vm_init.c Introduce a new parameter "superpage_align" to kmem_suballoc() that is 2008-05-10 21:46:20 +00:00
vm_kern.c Eliminate stale comments from kmem_malloc(). 2008-07-18 17:41:31 +00:00
vm_kern.h Enable the creation of a kmem map larger than 4GB. 2008-07-05 19:34:33 +00:00
vm_map.c KERNBASE is not necessarily an address within the kernel map, e.g., 2008-06-21 21:02:13 +00:00
vm_map.h Generalize vm_map_find(9)'s parameter "find_space". Specifically, add 2008-05-10 18:55:35 +00:00
vm_meter.c - Relax requirements for p_numthreads, p_threads, p_swtick, and p_nice from 2008-03-19 06:19:01 +00:00
vm_mmap.c To date, our implementation of munmap(2) has required that the 2008-05-24 21:57:16 +00:00
vm_object.c Allow VM object creation in ufs_lookup. (If vfs.vmiodirenable is set) 2008-05-20 19:05:43 +00:00
vm_object.h Allow VM object creation in ufs_lookup. (If vfs.vmiodirenable is set) 2008-05-20 19:05:43 +00:00
vm_page.c Essentially, neither madvise(..., MADV_DONTNEED) nor madvise(..., MADV_FREE) 2008-06-06 18:38:43 +00:00
vm_page.h Rename vm_pageq_requeue() to vm_page_requeue() on account of its recent 2008-03-19 20:24:35 +00:00
vm_pageout.c Rename vm_pageq_requeue() to vm_page_requeue() on account of its recent 2008-03-19 20:24:35 +00:00
vm_pageout.h Make contigmalloc(9)'s page laundering more robust. Specifically, use 2007-11-25 20:37:29 +00:00
vm_pager.c Consider a scenario in which one processor, call it Pt, is performing 2007-08-05 21:04:32 +00:00
vm_pager.h
vm_param.h Fix CTL_VM_NAMES. 2007-10-16 11:32:57 +00:00
vm_phys.c Introduce vm_reserv_reclaim_contig(). This function is used by 2008-04-06 18:09:28 +00:00
vm_phys.h Modify vm_phys_unfree_page() so that it no longer requires the given 2007-12-20 22:45:54 +00:00
vm_reserv.c Introduce vm_reserv_reclaim_contig(). This function is used by 2008-04-06 18:09:28 +00:00
vm_reserv.h Introduce vm_reserv_reclaim_contig(). This function is used by 2008-04-06 18:09:28 +00:00
vm_unix.c
vm_zeroidle.c - Make SCHED_STATS more generic by adding a wrapper to create the 2008-04-17 04:20:10 +00:00
vm.h Add the superpage reservation type. 2007-12-27 17:08:11 +00:00
vnode_pager.c The behaviour of the lockmgr going back at least to the 4.4BSD-Lite2 was 2008-07-30 18:16:06 +00:00
vnode_pager.h