Subversion リポジトリの参照
Diff of /branches/ccs-patch/security/ccsecurity/domain.c
Parent Directory
| Revision Log
| Patch
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 |
/** |
/** |
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 |
|
|
| |