[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xsm: Avoid null dereference in flask get_page_sid



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1284395242 -3600
# Node ID ec31bb01c4243df239dbdbe362e8296afda91cc0
# Parent  e64710373db7182bd8235f0af6dc33b83fd94c95
xsm: Avoid null dereference in flask get_page_sid

From: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
---
 xen/xsm/flask/hooks.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -r e64710373db7 -r ec31bb01c424 xen/xsm/flask/hooks.c
--- a/xen/xsm/flask/hooks.c     Mon Sep 13 17:26:49 2010 +0100
+++ b/xen/xsm/flask/hooks.c     Mon Sep 13 17:27:22 2010 +0100
@@ -340,7 +340,10 @@ static int get_page_sid(struct page_info
         default:
             /*Pages are implicitly labeled by domain ownership!*/
             dsec = d->ssid;
-            *sid = dsec->sid;
+            if (dsec)
+                *sid = dsec->sid;
+            else
+                rc = -ENOENT;
         break;
     }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.