Avoid overflow for the page counts.
Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
aae2e36cd5
commit
d005ed537c
@ -933,8 +933,9 @@ vn_io_fault(struct file *fp, struct uio *uio, struct ucred *active_cred,
|
||||
void *rl_cookie;
|
||||
struct mount *mp;
|
||||
vm_page_t *prev_td_ma;
|
||||
int cnt, error, save, saveheld, prev_td_ma_cnt;
|
||||
int error, save, saveheld, prev_td_ma_cnt;
|
||||
vm_offset_t addr, end;
|
||||
vm_size_t cnt;
|
||||
vm_prot_t prot;
|
||||
size_t len, resid;
|
||||
ssize_t adv;
|
||||
|
@ -1074,7 +1074,7 @@ vm_fault_quick_hold_pages(vm_map_t map, vm_offset_t addr, vm_size_t len,
|
||||
{
|
||||
vm_offset_t end, va;
|
||||
vm_page_t *mp;
|
||||
int count;
|
||||
vm_size_t count;
|
||||
boolean_t pmap_failed;
|
||||
|
||||
if (len == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user