aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2015-09-09 06:19:33 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2015-09-09 06:19:33 +0000
commitb8db977617abef55ff8f39a5790eaf47c6b78a63 (patch)
tree0b371654a082bcc4da18c3883e936c30a98e4f09 /sys/dev/usb
parentab9cee11d653143629196da747747b4911bfe53c (diff)
downloadsrc-b8db977617abef55ff8f39a5790eaf47c6b78a63.tar.gz
src-b8db977617abef55ff8f39a5790eaf47c6b78a63.zip
Remove a check which caused spurious SIGSEGV on usermode access to the
mapped address without valid pte installed, when parallel wiring of the entry happen. The entry must be copy on write. If entry is COW but was already copied, and parallel wiring set MAP_ENTRY_IN_TRANSITION, vm_fault() would sleep waiting for the MAP_ENTRY_IN_TRANSITION flag to clear. After that, the fault handler is restarted and vm_map_lookup() or vm_map_lookup_locked() trip over the check. Note that this is race, if the address is accessed after the wiring is done, the entry does not fault at all. There is no reason in the current kernel to disallow write access to the COW wired entry if the entry permissions allow it. Initially this was done in r24666, since that kernel did not supported proper copy-on-write for wired text, which was fixed in r199869. The r251901 revision re-introduced the r24666 fix for the current VM. Note that write access must clear MAP_ENTRY_NEEDS_COPY entry flag by performing COW. In reverse, when MAP_ENTRY_NEEDS_COPY is set in vmspace_fork(), the MAP_ENTRY_USER_WIRED flag is cleared. Put the assert stating the invariant, instead of returning the error. Reported and debugging help by: peter Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week
Notes
Notes: svn path=/head/; revision=287591
Diffstat (limited to 'sys/dev/usb')
0 files changed, 0 insertions, 0 deletions