|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Separate the validity checking of the page frame in 2 ch
# HG changeset patch
# User vhanquez@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID aad2b2da3c8beda24bc62ca6e92b28c28def0849
# Parent 159ef7d83f1c9860cbc5d6adcf10d3752eafffbb
Separate the validity checking of the page frame in 2 chunks.
give a more accurate error message, and don't call pfn_to_page before
validating the pfn.
Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>
diff -r 159ef7d83f1c -r aad2b2da3c8b xen/common/grant_table.c
--- a/xen/common/grant_table.c Wed Jan 25 11:34:02 2006
+++ b/xen/common/grant_table.c Wed Jan 25 11:51:21 2006
@@ -719,10 +719,18 @@
}
/* Check the passed page frame for basic validity. */
+ if ( unlikely(!pfn_valid(gop.mfn)) )
+ {
+ DPRINTK("gnttab_transfer: out-of-range %lx\n",
+ (unsigned long)gop.mfn);
+ (void)__put_user(GNTST_bad_page, &uop[i].status);
+ continue;
+ }
+
page = pfn_to_page(gop.mfn);
- if ( unlikely(!pfn_valid(gop.mfn) || IS_XEN_HEAP_FRAME(page)) )
+ if ( unlikely(IS_XEN_HEAP_FRAME(page)) )
{
- DPRINTK("gnttab_transfer: out-of-range or xen frame %lx\n",
+ DPRINTK("gnttab_transfer: xen frame %lx\n",
(unsigned long)gop.mfn);
(void)__put_user(GNTST_bad_page, &uop[i].status);
continue;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] Separate the validity checking of the page frame in 2 chunks.,
Xen patchbot -unstable <=
|
|
|
|
|