diff options
author | Jan Beulich <jbeulich@suse.com> | 2012-12-12 11:18:31 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2012-12-12 11:18:31 +0100 |
commit | baf237eb06cc10408baf6b5a0c44973bb180e102 (patch) | |
tree | cca5938e5a329d65df123320562337ccc32c19ce | |
parent | 95c50f664d84a322826fcc7e0269bbba229000fe (diff) | |
download | xen-baf237eb06cc10408baf6b5a0c44973bb180e102.tar.gz xen-baf237eb06cc10408baf6b5a0c44973bb180e102.tar.bz2 xen-baf237eb06cc10408baf6b5a0c44973bb180e102.zip |
x86: properly fail mmuext ops when get_page_from_gfn() fails
I noticed this inconsistency while analyzing the code for XSA-32.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen-unstable changeset: 26260:e80bac7c6598
xen-unstable date: Fri Dec 7 12:40:46 UTC 2012
-rw-r--r-- | xen/arch/x86/mm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index ef5a242b9f..562c4b9fb9 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -3070,7 +3070,7 @@ long do_mmuext_op( page = get_page_from_gfn(pg_owner, op.arg1.mfn, NULL, P2M_ALLOC); if ( unlikely(!page) ) { - rc = -EINVAL; + okay = 0; break; } @@ -3130,6 +3130,7 @@ long do_mmuext_op( page = get_page_from_gfn(pg_owner, op.arg1.mfn, NULL, P2M_ALLOC); if ( unlikely(!page) ) { + okay = 0; MEM_LOG("Mfn %lx bad domain", op.arg1.mfn); break; } |