mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 09:14:19 +08:00
xen: fix truncation of machine address
arbitrary_virt_to_machine can truncate a machine address if its above 4G. Cast the problem away. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Stephen Tweedie <sct@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
39dbc5bd34
commit
ebd879e397
@ -186,7 +186,7 @@ xmaddr_t arbitrary_virt_to_machine(unsigned long address)
|
||||
|
||||
BUG_ON(pte == NULL);
|
||||
|
||||
return XMADDR((pte_mfn(*pte) << PAGE_SHIFT) + offset);
|
||||
return XMADDR(((phys_addr_t)pte_mfn(*pte) << PAGE_SHIFT) + offset);
|
||||
}
|
||||
|
||||
void make_lowmem_page_readonly(void *vaddr)
|
||||
|
Loading…
Reference in New Issue
Block a user