Skip to content

Commit

Permalink
xen: fix truncation of machine address
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeremy Fitzhardinge authored and Ingo Molnar committed Jul 16, 2008
1 parent 39dbc5b commit ebd879e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/xen/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ebd879e

Please sign in to comment.