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

Subversion リポジトリの参照

Diff of /branches/ccs-patch/security/ccsecurity/domain.c

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

revision 1697 by kumaneko, Sun Oct 12 02:27:07 2008 UTC revision 1700 by kumaneko, Mon Oct 13 04:57:50 2008 UTC
# Line 88  struct alias_entry { Line 88  struct alias_entry {
88  void ccs_set_domain_flag(struct domain_info *domain, const bool is_delete,  void ccs_set_domain_flag(struct domain_info *domain, const bool is_delete,
89                           const u8 flags)                           const u8 flags)
90  {  {
91          mutex_lock(&domain_list_lock);          /* We need to serialize because this is bitfield operation. */
92            static DEFINE_SPINLOCK(lock);
93            /***** CRITICAL SECTION START *****/
94            spin_lock(&lock);
95          if (!is_delete)          if (!is_delete)
96                  domain->flags |= flags;                  domain->flags |= flags;
97          else          else
98                  domain->flags &= ~flags;                  domain->flags &= ~flags;
99          mutex_unlock(&domain_list_lock);          spin_unlock(&lock);
100            /***** CRITICAL SECTION END *****/
101  }  }
102    
103  /**  /**
# Line 858  struct domain_info *ccs_find_or_assign_n Line 862  struct domain_info *ccs_find_or_assign_n
862                  list1_for_each_entry(ptr, &domain->acl_info_list, list) {                  list1_for_each_entry(ptr, &domain->acl_info_list, list) {
863                          ptr->type |= ACL_DELETED;                          ptr->type |= ACL_DELETED;
864                  }                  }
865                  /*                  ccs_set_domain_flag(domain, true, domain->flags);
                  * Don't use ccs_set_domain_flag() because  
                  * domain_list_lock is held.  
                  */  
                 domain->flags = 0;  
866                  domain->profile = profile;                  domain->profile = profile;
867                  domain->quota_warned = false;                  domain->quota_warned = false;
868                  mb(); /* Avoid out-of-order execution. */                  mb(); /* Avoid out-of-order execution. */

Legend:
Removed from v.1697  
changed lines
  Added in v.1700

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