aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/tomoyo/gc.c')
-rw-r--r--security/tomoyo/gc.c63
1 files changed, 33 insertions, 30 deletions
diff --git a/security/tomoyo/gc.c b/security/tomoyo/gc.c
index aed7ddd0de84..2dd9665af260 100644
--- a/security/tomoyo/gc.c
+++ b/security/tomoyo/gc.c
@@ -216,33 +216,34 @@ static void tomoyo_collect_entry(void)
216 { 216 {
217 struct tomoyo_globally_readable_file_entry *ptr; 217 struct tomoyo_globally_readable_file_entry *ptr;
218 list_for_each_entry_rcu(ptr, &tomoyo_globally_readable_list, 218 list_for_each_entry_rcu(ptr, &tomoyo_globally_readable_list,
219 list) { 219 head.list) {
220 if (!ptr->is_deleted) 220 if (!ptr->head.is_deleted)
221 continue; 221 continue;
222 if (tomoyo_add_to_gc(TOMOYO_ID_GLOBALLY_READABLE, ptr)) 222 if (tomoyo_add_to_gc(TOMOYO_ID_GLOBALLY_READABLE, ptr))
223 list_del_rcu(&ptr->list); 223 list_del_rcu(&ptr->head.list);
224 else 224 else
225 break; 225 break;
226 } 226 }
227 } 227 }
228 { 228 {
229 struct tomoyo_pattern_entry *ptr; 229 struct tomoyo_pattern_entry *ptr;
230 list_for_each_entry_rcu(ptr, &tomoyo_pattern_list, list) { 230 list_for_each_entry_rcu(ptr, &tomoyo_pattern_list, head.list) {
231 if (!ptr->is_deleted) 231 if (!ptr->head.is_deleted)
232 continue; 232 continue;
233 if (tomoyo_add_to_gc(TOMOYO_ID_PATTERN, ptr)) 233 if (tomoyo_add_to_gc(TOMOYO_ID_PATTERN, ptr))
234 list_del_rcu(&ptr->list); 234 list_del_rcu(&ptr->head.list);
235 else 235 else
236 break; 236 break;
237 } 237 }
238 } 238 }
239 { 239 {
240 struct tomoyo_no_rewrite_entry *ptr; 240 struct tomoyo_no_rewrite_entry *ptr;
241 list_for_each_entry_rcu(ptr, &tomoyo_no_rewrite_list, list) { 241 list_for_each_entry_rcu(ptr, &tomoyo_no_rewrite_list,
242 if (!ptr->is_deleted) 242 head.list) {
243 if (!ptr->head.is_deleted)
243 continue; 244 continue;
244 if (tomoyo_add_to_gc(TOMOYO_ID_NO_REWRITE, ptr)) 245 if (tomoyo_add_to_gc(TOMOYO_ID_NO_REWRITE, ptr))
245 list_del_rcu(&ptr->list); 246 list_del_rcu(&ptr->head.list);
246 else 247 else
247 break; 248 break;
248 } 249 }
@@ -250,44 +251,46 @@ static void tomoyo_collect_entry(void)
250 { 251 {
251 struct tomoyo_domain_initializer_entry *ptr; 252 struct tomoyo_domain_initializer_entry *ptr;
252 list_for_each_entry_rcu(ptr, &tomoyo_domain_initializer_list, 253 list_for_each_entry_rcu(ptr, &tomoyo_domain_initializer_list,
253 list) { 254 head.list) {
254 if (!ptr->is_deleted) 255 if (!ptr->head.is_deleted)
255 continue; 256 continue;
256 if (tomoyo_add_to_gc(TOMOYO_ID_DOMAIN_INITIALIZER, ptr)) 257 if (tomoyo_add_to_gc(TOMOYO_ID_DOMAIN_INITIALIZER, ptr))
257 list_del_rcu(&ptr->list); 258 list_del_rcu(&ptr->head.list);
258 else 259 else
259 break; 260 break;
260 } 261 }
261 } 262 }
262 { 263 {
263 struct tomoyo_domain_keeper_entry *ptr; 264 struct tomoyo_domain_keeper_entry *ptr;
264 list_for_each_entry_rcu(ptr, &tomoyo_domain_keeper_list, list) { 265 list_for_each_entry_rcu(ptr, &tomoyo_domain_keeper_list,
265 if (!ptr->is_deleted) 266 head.list) {
267 if (!ptr->head.is_deleted)
266 continue; 268 continue;
267 if (tomoyo_add_to_gc(TOMOYO_ID_DOMAIN_KEEPER, ptr)) 269 if (tomoyo_add_to_gc(TOMOYO_ID_DOMAIN_KEEPER, ptr))
268 list_del_rcu(&ptr->list); 270 list_del_rcu(&ptr->head.list);
269 else 271 else
270 break; 272 break;
271 } 273 }
272 } 274 }
273 { 275 {
274 struct tomoyo_aggregator_entry *ptr; 276 struct tomoyo_aggregator_entry *ptr;
275 list_for_each_entry_rcu(ptr, &tomoyo_aggregator_list, list) { 277 list_for_each_entry_rcu(ptr, &tomoyo_aggregator_list,
276 if (!ptr->is_deleted) 278 head.list) {
279 if (!ptr->head.is_deleted)
277 continue; 280 continue;
278 if (tomoyo_add_to_gc(TOMOYO_ID_AGGREGATOR, ptr)) 281 if (tomoyo_add_to_gc(TOMOYO_ID_AGGREGATOR, ptr))
279 list_del_rcu(&ptr->list); 282 list_del_rcu(&ptr->head.list);
280 else 283 else
281 break; 284 break;
282 } 285 }
283 } 286 }
284 { 287 {
285 struct tomoyo_alias_entry *ptr; 288 struct tomoyo_alias_entry *ptr;
286 list_for_each_entry_rcu(ptr, &tomoyo_alias_list, list) { 289 list_for_each_entry_rcu(ptr, &tomoyo_alias_list, head.list) {
287 if (!ptr->is_deleted) 290 if (!ptr->head.is_deleted)
288 continue; 291 continue;
289 if (tomoyo_add_to_gc(TOMOYO_ID_ALIAS, ptr)) 292 if (tomoyo_add_to_gc(TOMOYO_ID_ALIAS, ptr))
290 list_del_rcu(&ptr->list); 293 list_del_rcu(&ptr->head.list);
291 else 294 else
292 break; 295 break;
293 } 296 }
@@ -295,11 +298,11 @@ static void tomoyo_collect_entry(void)
295 { 298 {
296 struct tomoyo_policy_manager_entry *ptr; 299 struct tomoyo_policy_manager_entry *ptr;
297 list_for_each_entry_rcu(ptr, &tomoyo_policy_manager_list, 300 list_for_each_entry_rcu(ptr, &tomoyo_policy_manager_list,
298 list) { 301 head.list) {
299 if (!ptr->is_deleted) 302 if (!ptr->head.is_deleted)
300 continue; 303 continue;
301 if (tomoyo_add_to_gc(TOMOYO_ID_MANAGER, ptr)) 304 if (tomoyo_add_to_gc(TOMOYO_ID_MANAGER, ptr))
302 list_del_rcu(&ptr->list); 305 list_del_rcu(&ptr->head.list);
303 else 306 else
304 break; 307 break;
305 } 308 }
@@ -352,12 +355,12 @@ static void tomoyo_collect_entry(void)
352 list_for_each_entry_rcu(group, &tomoyo_path_group_list, list) { 355 list_for_each_entry_rcu(group, &tomoyo_path_group_list, list) {
353 struct tomoyo_path_group_member *member; 356 struct tomoyo_path_group_member *member;
354 list_for_each_entry_rcu(member, &group->member_list, 357 list_for_each_entry_rcu(member, &group->member_list,
355 list) { 358 head.list) {
356 if (!member->is_deleted) 359 if (!member->head.is_deleted)
357 continue; 360 continue;
358 if (tomoyo_add_to_gc(TOMOYO_ID_PATH_GROUP_MEMBER, 361 if (tomoyo_add_to_gc(TOMOYO_ID_PATH_GROUP_MEMBER,
359 member)) 362 member))
360 list_del_rcu(&member->list); 363 list_del_rcu(&member->head.list);
361 else 364 else
362 break; 365 break;
363 } 366 }
@@ -375,12 +378,12 @@ static void tomoyo_collect_entry(void)
375 list_for_each_entry_rcu(group, &tomoyo_number_group_list, list) { 378 list_for_each_entry_rcu(group, &tomoyo_number_group_list, list) {
376 struct tomoyo_number_group_member *member; 379 struct tomoyo_number_group_member *member;
377 list_for_each_entry_rcu(member, &group->member_list, 380 list_for_each_entry_rcu(member, &group->member_list,
378 list) { 381 head.list) {
379 if (!member->is_deleted) 382 if (!member->head.is_deleted)
380 continue; 383 continue;
381 if (tomoyo_add_to_gc(TOMOYO_ID_NUMBER_GROUP_MEMBER, 384 if (tomoyo_add_to_gc(TOMOYO_ID_NUMBER_GROUP_MEMBER,
382 member)) 385 member))
383 list_del_rcu(&member->list); 386 list_del_rcu(&member->head.list);
384 else 387 else
385 break; 388 break;
386 } 389 }