$NetBSD: patch-CVE-2012-3496,v 1.1 2012/09/12 11:04:17 drochner Exp $

see http://lists.xen.org/archives/html/xen-devel/2012-09/msg00194.html

--- xen/arch/x86/mm/p2m.c.orig	2012-08-10 13:51:45.000000000 +0000
+++ xen/arch/x86/mm/p2m.c
@@ -2414,7 +2414,8 @@ guest_physmap_mark_populate_on_demand(st
     int pod_count = 0;
     int rc = 0;
 
-    BUG_ON(!paging_mode_translate(d));
+    if ( !paging_mode_translate(d) )
+        return -EINVAL;
 
     rc = gfn_check_limit(d, gfn, order);
     if ( rc != 0 )
