ia64/xen-unstable

changeset 14033:b5ee25f50861

Merge
author Tim Deegan <Tim.Deegan@xensource.com>
date Tue Feb 20 16:19:40 2007 +0000 (2007-02-20)
parents f48553000369 c57d80520e7a
children 4719e34ed7a7
files
line diff
     1.1 --- a/xen/acm/acm_simple_type_enforcement_hooks.c	Tue Feb 20 16:18:56 2007 +0000
     1.2 +++ b/xen/acm/acm_simple_type_enforcement_hooks.c	Tue Feb 20 16:19:40 2007 +0000
     1.3 @@ -235,7 +235,7 @@ ste_init_state(struct acm_ste_policy_buf
     1.4          } 
     1.5          /* b) check for grant table conflicts on shared pages */
     1.6          spin_lock(&(*pd)->grant_table->lock);
     1.7 -        for ( i = 0; i < nr_grant_frames((*pd)->grant_table); i++ ) {
     1.8 +        for ( i = 0; i < nr_grant_entries((*pd)->grant_table); i++ ) {
     1.9  #define SPP (PAGE_SIZE / sizeof(struct grant_entry))
    1.10              sha_copy = (*pd)->grant_table->shared[i/SPP][i%SPP];
    1.11              if ( sha_copy.flags ) {
    1.12 @@ -244,8 +244,9 @@ ste_init_state(struct acm_ste_policy_buf
    1.13                          (unsigned long)sha_copy.frame);
    1.14                  rdomid = sha_copy.domid;
    1.15                  if ((rdom = get_domain_by_id(rdomid)) == NULL) {
    1.16 +                    spin_unlock(&(*pd)->grant_table->lock);
    1.17                      printkd("%s: domain not found ERROR!\n", __func__);
    1.18 -                    goto out_gnttab;
    1.19 +                    goto out;
    1.20                  };
    1.21                  /* rdom now has remote domain */
    1.22                  ste_rssid = GET_SSIDP(ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY, 
    1.23 @@ -253,16 +254,16 @@ ste_init_state(struct acm_ste_policy_buf
    1.24                  ste_rssidref = ste_rssid->ste_ssidref;
    1.25                  put_domain(rdom);
    1.26                  if (!have_common_type(ste_ssidref, ste_rssidref)) {
    1.27 +                    spin_unlock(&(*pd)->grant_table->lock);
    1.28                      printkd("%s: Policy violation in grant table sharing domain %x -> domain %x.\n",
    1.29                              __func__, (*pd)->domain_id, rdomid);
    1.30 -                    goto out_gnttab;
    1.31 +                    goto out;
    1.32                  }
    1.33              }
    1.34          }
    1.35 +        spin_unlock(&(*pd)->grant_table->lock);
    1.36      }
    1.37      violation = 0;
    1.38 - out_gnttab:
    1.39 -    spin_unlock(&(*pd)->grant_table->lock);
    1.40   out:
    1.41      read_unlock(&domlist_lock);
    1.42      return violation;