オープンソース・ソフトウェアの開発とダウンロード

Subversion リポジトリの参照

Diff of /trunk/1.6.x/ccs-patch/fs/tomoyo_domain.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1687 by kumaneko, Fri Oct 10 13:53:24 2008 UTC revision 1695 by kumaneko, Sat Oct 11 08:46:59 2008 UTC
# Line 5  Line 5 
5   *   *
6   * Copyright (C) 2005-2008  NTT DATA CORPORATION   * Copyright (C) 2005-2008  NTT DATA CORPORATION
7   *   *
8   * Version: 1.6.5-pre   2008/10/07   * Version: 1.6.5-pre   2008/10/11
9   *   *
10   * This file is applicable to both 2.4.30 and 2.6.11 and later.   * This file is applicable to both 2.4.30 and 2.6.11 and later.
11   * See README.ccs for ChangeLog.   * See README.ccs for ChangeLog.
# Line 37  LIST1_HEAD(domain_list); Line 37  LIST1_HEAD(domain_list);
37    
38  #ifdef CONFIG_TOMOYO  #ifdef CONFIG_TOMOYO
39    
 /* Lock for appending domain's ACL. */  
 DEFINE_MUTEX(domain_acl_lock);  
   
40  /* Domain creation lock. */  /* Domain creation lock. */
41  static DEFINE_MUTEX(new_domain_assign_lock);  static DEFINE_MUTEX(new_domain_assign_lock);
42    
# Line 125  const char *ccs_get_last_name(const stru Line 122  const char *ccs_get_last_name(const stru
122   */   */
123  int ccs_add_domain_acl(struct domain_info *domain, struct acl_info *acl)  int ccs_add_domain_acl(struct domain_info *domain, struct acl_info *acl)
124  {  {
125          if (domain)          if (domain) {
126                    /*
127                     * We need to serialize because this function is called by
128                     * various update functions.
129                     */
130                    static DEFINE_SPINLOCK(lock);
131                    /***** CRITICAL SECTION START *****/
132                    spin_lock(&lock);
133                  list1_add_tail_mb(&acl->list, &domain->acl_info_list);                  list1_add_tail_mb(&acl->list, &domain->acl_info_list);
134          else                  spin_unlock(&lock);
135                    /***** CRITICAL SECTION END *****/
136            } else {
137                  acl->type &= ~ACL_DELETED;                  acl->type &= ~ACL_DELETED;
138            }
139          ccs_update_counter(CCS_UPDATES_COUNTER_DOMAIN_POLICY);          ccs_update_counter(CCS_UPDATES_COUNTER_DOMAIN_POLICY);
140          return 0;          return 0;
141  }  }

Legend:
Removed from v.1687  
changed lines
  Added in v.1695

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26