xen/18420-x86-page-type-preemptible-fix.patch

52 lines
1.7 KiB
Diff
Raw Normal View History

# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1220450168 -3600
# Node ID c9db93b0660ae644491c862e47744a2349ba630f
# Parent 1e98ea5c860438a227e135701e6439b22826f52f
x86: Fix interpretation of get_l*e_linear_pagetable().
Broken by get_page_type() preemption patch (c/s 18412).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Index: xen-3.3.0-testing/xen/arch/x86/mm.c
===================================================================
--- xen-3.3.0-testing.orig/xen/arch/x86/mm.c
+++ xen-3.3.0-testing/xen/arch/x86/mm.c
@@ -762,9 +762,8 @@ get_page_from_l2e(
rc = get_page_and_type_from_pagenr(
l2e_get_pfn(l2e), PGT_l1_page_table, d, 0);
- if ( unlikely(rc) && rc != -EAGAIN &&
- get_l2_linear_pagetable(l2e, pfn, d) )
- rc = -EINVAL;
+ if ( unlikely(rc == -EINVAL) && get_l2_linear_pagetable(l2e, pfn, d) )
+ rc = 0;
return rc;
}
@@ -788,9 +787,8 @@ get_page_from_l3e(
rc = get_page_and_type_from_pagenr(
l3e_get_pfn(l3e), PGT_l2_page_table, d, preemptible);
- if ( unlikely(rc) && rc != -EAGAIN && rc != -EINTR &&
- get_l3_linear_pagetable(l3e, pfn, d) )
- rc = -EINVAL;
+ if ( unlikely(rc == -EINVAL) && get_l3_linear_pagetable(l3e, pfn, d) )
+ rc = 0;
return rc;
}
@@ -814,9 +812,8 @@ get_page_from_l4e(
rc = get_page_and_type_from_pagenr(
l4e_get_pfn(l4e), PGT_l3_page_table, d, preemptible);
- if ( unlikely(rc) && rc != -EAGAIN && rc != -EINTR &&
- get_l4_linear_pagetable(l4e, pfn, d) )
- rc = -EINVAL;
+ if ( unlikely(rc == -EINVAL) && get_l4_linear_pagetable(l4e, pfn, d) )
+ rc = 0;
return rc;
}