Fix problem where a user buffer outside of the area being tested
will be corrupted. PR: 29194 Obtained from: Tor.Egge@fast.no MFC after: 2 weeks
This commit is contained in:
parent
8ec410b54a
commit
22883e3c68
@ -303,7 +303,7 @@ vmapbuf(bp)
|
||||
* Do the vm_fault if needed; do the copy-on-write thing
|
||||
* when reading stuff off device into memory.
|
||||
*/
|
||||
vm_fault_quick(addr,
|
||||
vm_fault_quick((addr >= bp->b_data) ? addr : bp->b_data,
|
||||
(bp->b_iocmd == BIO_READ)?(VM_PROT_READ|VM_PROT_WRITE):VM_PROT_READ);
|
||||
pa = trunc_page(pmap_kextract((vm_offset_t) addr));
|
||||
if (pa == 0)
|
||||
|
@ -357,7 +357,7 @@ vmapbuf(bp)
|
||||
* Do the vm_fault if needed; do the copy-on-write thing
|
||||
* when reading stuff off device into memory.
|
||||
*/
|
||||
vm_fault_quick(addr,
|
||||
vm_fault_quick((addr >= bp->b_data) ? addr : bp->b_data,
|
||||
(bp->b_iocmd == BIO_READ)?(VM_PROT_READ|VM_PROT_WRITE):VM_PROT_READ);
|
||||
pa = trunc_page(pmap_kextract((vm_offset_t) addr));
|
||||
if (pa == 0)
|
||||
|
@ -357,7 +357,7 @@ vmapbuf(bp)
|
||||
* Do the vm_fault if needed; do the copy-on-write thing
|
||||
* when reading stuff off device into memory.
|
||||
*/
|
||||
vm_fault_quick(addr,
|
||||
vm_fault_quick((addr >= bp->b_data) ? addr : bp->b_data,
|
||||
(bp->b_iocmd == BIO_READ)?(VM_PROT_READ|VM_PROT_WRITE):VM_PROT_READ);
|
||||
pa = trunc_page(pmap_kextract((vm_offset_t) addr));
|
||||
if (pa == 0)
|
||||
|
@ -356,7 +356,7 @@ vmapbuf(bp)
|
||||
* Do the vm_fault if needed; do the copy-on-write thing
|
||||
* when reading stuff off device into memory.
|
||||
*/
|
||||
vm_fault_quick(addr,
|
||||
vm_fault_quick((addr >= bp->b_data) ? addr : bp->b_data,
|
||||
(bp->b_iocmd == BIO_READ)?(VM_PROT_READ|VM_PROT_WRITE):VM_PROT_READ);
|
||||
pa = trunc_page(pmap_kextract((vm_offset_t) addr));
|
||||
if (pa == 0)
|
||||
|
@ -218,7 +218,7 @@ vmapbuf(bp)
|
||||
* Do the vm_fault if needed; do the copy-on-write thing
|
||||
* when reading stuff off device into memory.
|
||||
*/
|
||||
vm_fault_quick(addr,
|
||||
vm_fault_quick((addr >= bp->b_data) ? addr : bp->b_data,
|
||||
(bp->b_iocmd == BIO_READ)?(VM_PROT_READ|VM_PROT_WRITE):VM_PROT_READ);
|
||||
pa = trunc_page(pmap_kextract((vm_offset_t) addr));
|
||||
if (pa == 0)
|
||||
|
@ -218,7 +218,7 @@ vmapbuf(bp)
|
||||
* Do the vm_fault if needed; do the copy-on-write thing
|
||||
* when reading stuff off device into memory.
|
||||
*/
|
||||
vm_fault_quick(addr,
|
||||
vm_fault_quick((addr >= bp->b_data) ? addr : bp->b_data,
|
||||
(bp->b_iocmd == BIO_READ)?(VM_PROT_READ|VM_PROT_WRITE):VM_PROT_READ);
|
||||
pa = trunc_page(pmap_kextract((vm_offset_t) addr));
|
||||
if (pa == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user