Follow-up to r313690.
Fix two missed places where vm_object offset to index calculation should use unsigned shift, to allow handling of full range of unsigned offsets used to create device mappings. Reported and tested by: royger (previous version) Reviewed by: alc (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
c77fb55571
commit
dada1184e8
@ -4122,7 +4122,7 @@ RetryLookup:;
|
||||
* Return the object/offset from this entry. If the entry was
|
||||
* copy-on-write or empty, it has been fixed up.
|
||||
*/
|
||||
*pindex = OFF_TO_IDX((vaddr - entry->start) + entry->offset);
|
||||
*pindex = UOFF_TO_IDX((vaddr - entry->start) + entry->offset);
|
||||
*object = entry->object.vm_object;
|
||||
|
||||
*out_prot = prot;
|
||||
@ -4203,7 +4203,7 @@ vm_map_lookup_locked(vm_map_t *var_map, /* IN/OUT */
|
||||
* Return the object/offset from this entry. If the entry was
|
||||
* copy-on-write or empty, it has been fixed up.
|
||||
*/
|
||||
*pindex = OFF_TO_IDX((vaddr - entry->start) + entry->offset);
|
||||
*pindex = UOFF_TO_IDX((vaddr - entry->start) + entry->offset);
|
||||
*object = entry->object.vm_object;
|
||||
|
||||
*out_prot = prot;
|
||||
|
Loading…
Reference in New Issue
Block a user