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

[Xen-changelog] [xen-unstable] Merge



# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1171988380 0
# Node ID b5ee25f5086112ce454d026c0f938625ab2449f1
# Parent  f48553000369bc7d81d809bb7fb35a60c7d78fff
# Parent  c57d80520e7a3e555fc8d746483d04c4962f74af
Merge
---
 xen/acm/acm_simple_type_enforcement_hooks.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff -r f48553000369 -r b5ee25f50861 xen/acm/acm_simple_type_enforcement_hooks.c
--- a/xen/acm/acm_simple_type_enforcement_hooks.c       Tue Feb 20 16:18:56 
2007 +0000
+++ b/xen/acm/acm_simple_type_enforcement_hooks.c       Tue Feb 20 16:19:40 
2007 +0000
@@ -235,7 +235,7 @@ ste_init_state(struct acm_ste_policy_buf
         } 
         /* b) check for grant table conflicts on shared pages */
         spin_lock(&(*pd)->grant_table->lock);
-        for ( i = 0; i < nr_grant_frames((*pd)->grant_table); i++ ) {
+        for ( i = 0; i < nr_grant_entries((*pd)->grant_table); i++ ) {
 #define SPP (PAGE_SIZE / sizeof(struct grant_entry))
             sha_copy = (*pd)->grant_table->shared[i/SPP][i%SPP];
             if ( sha_copy.flags ) {
@@ -244,8 +244,9 @@ ste_init_state(struct acm_ste_policy_buf
                         (unsigned long)sha_copy.frame);
                 rdomid = sha_copy.domid;
                 if ((rdom = get_domain_by_id(rdomid)) == NULL) {
+                    spin_unlock(&(*pd)->grant_table->lock);
                     printkd("%s: domain not found ERROR!\n", __func__);
-                    goto out_gnttab;
+                    goto out;
                 };
                 /* rdom now has remote domain */
                 ste_rssid = GET_SSIDP(ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY, 
@@ -253,16 +254,16 @@ ste_init_state(struct acm_ste_policy_buf
                 ste_rssidref = ste_rssid->ste_ssidref;
                 put_domain(rdom);
                 if (!have_common_type(ste_ssidref, ste_rssidref)) {
+                    spin_unlock(&(*pd)->grant_table->lock);
                     printkd("%s: Policy violation in grant table sharing 
domain %x -> domain %x.\n",
                             __func__, (*pd)->domain_id, rdomid);
-                    goto out_gnttab;
+                    goto out;
                 }
             }
         }
+        spin_unlock(&(*pd)->grant_table->lock);
     }
     violation = 0;
- out_gnttab:
-    spin_unlock(&(*pd)->grant_table->lock);
  out:
     read_unlock(&domlist_lock);
     return violation;

_______________________________________________
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®.