diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-07-08 22:06:54 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-16 09:01:03 (GMT) |
commit | ebd879e397f6361727c36267a12d1650710e465a (patch) | |
tree | e25ef12602eaa5d7ac07ec41e4c77d56f69c8170 /arch/x86/xen/mmu.c | |
parent | 39dbc5bd345ebf93e066dde7f8e29467eb61b42e (diff) | |
download | linux-ebd879e397f6361727c36267a12d1650710e465a.tar.xz |
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>
Diffstat (limited to 'arch/x86/xen/mmu.c')
-rw-r--r-- | arch/x86/xen/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 2579e70..05d7392 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -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) |