|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] x86: add an extra check when validating a
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1252510781 -3600
# Node ID d2a32e24fe504b9626e6732b4f213c7cb1bc8b57
# Parent 4226e02bdf7105d6e71f0608174ef07b7a94d738
x86: add an extra check when validating a huge pv L2 entry
While get_page_and_type_from_pagenr() (through get_page_from_pagenr())
does the needed mfn_valid() check, get_data_page() doesn't and, it
being passed a struct page_info pointer, really expects it's caller(s)
to do.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
xen/arch/x86/mm.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff -r 4226e02bdf71 -r d2a32e24fe50 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Wed Sep 09 16:32:25 2009 +0100
+++ b/xen/arch/x86/mm.c Wed Sep 09 16:39:41 2009 +0100
@@ -844,14 +844,16 @@ get_page_from_l2e(
int writeable = !!(l2e_get_flags(l2e) & _PAGE_RW);
do {
- rc = get_data_page(mfn_to_page(m), d, writeable);
- if ( unlikely(!rc) )
+ if ( !mfn_valid(m) ||
+ !get_data_page(mfn_to_page(m), d, writeable) )
{
while ( m-- > mfn )
put_data_page(mfn_to_page(m), writeable);
return -EINVAL;
}
} while ( m++ < (mfn + (L1_PAGETABLE_ENTRIES-1)) );
+
+ rc = 1;
}
return rc;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] x86: add an extra check when validating a huge pv L2 entry,
Xen patchbot-unstable <=
|
|
|
|
|