kernel - Fix VM deadlock in optimized file read path
authorCharlie Root <root@apollo.backplane.com>
Tue, 2 Jun 2015 01:17:30 +0000 (18:17 -0700)
committerCharlie Root <root@apollo.backplane.com>
Tue, 2 Jun 2015 01:17:30 +0000 (18:17 -0700)
commitefad0641c1e028d2533d32ce9dac1a97d0655888
treea093f51edd7067208653b7cf6a2950ed883df26b
parentc14287944497ee3b7ec6401db8413811eba744f0
kernel - Fix VM deadlock in optimized file read path

* The optimized file read path can deadlock if the uiocopy or copyout
  operation requires a non-trivial VM fault.  Most cases were handled,
  but a MAP_ENTRY_NEEDS_COPY->vm_map_entry_shadow() path was not being
  handled.

* Disallow the optimized path for the COW case.

Reported-by: Sevan Janiyan
sys/vm/vm_fault.c
sys/vm/vm_map.c
sys/vm/vm_param.h