|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Correct p2m unlocking during grant table map
# HG changeset patch
# User Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
# Date 1326969762 0
# Node ID f5b366c6c4c6a19f93f0c68dc9fc939f172ec908
# Parent 2049e165b73c5311851c03fc14f379286d0972ef
Correct p2m unlocking during grant table map
We were not putting gfn's consistently.
Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Committed-by: Tim Deegan <tim@xxxxxxx>
---
diff -r 2049e165b73c -r f5b366c6c4c6 xen/common/grant_table.c
--- a/xen/common/grant_table.c Thu Jan 19 10:42:42 2012 +0000
+++ b/xen/common/grant_table.c Thu Jan 19 10:42:42 2012 +0000
@@ -141,7 +141,7 @@
#define active_entry(t, e) \
((t)->active[(e)/ACGNT_PER_PAGE][(e)%ACGNT_PER_PAGE])
-/* Check if the page has been paged out */
+/* Check if the page has been paged out. If rc == GNTST_okay, caller must do
put_gfn(rd, gfn) */
static int __get_paged_frame(unsigned long gfn, unsigned long *frame, int
readonly, struct domain *rd)
{
int rc = GNTST_okay;
@@ -573,7 +573,10 @@
gfn = sha1 ? sha1->frame : sha2->full_page.frame;
rc = __get_paged_frame(gfn, &frame, !!(op->flags &
GNTMAP_readonly), rd);
if ( rc != GNTST_okay )
+ {
+ gfn = INVALID_GFN;
goto unlock_out;
+ }
act->gfn = gfn;
act->domid = ld->domain_id;
act->frame = frame;
@@ -700,7 +703,8 @@
op->handle = handle;
op->status = GNTST_okay;
- put_gfn(rd, gfn);
+ if ( gfn != INVALID_GFN )
+ put_gfn(rd, gfn);
rcu_unlock_domain(rd);
return;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |