Add changes missing in rcu-task-context-2.diff

This commit is contained in:
Andreas Gruenbacher 2007-03-22 13:05:13 +00:00
parent 98f6ce46d1
commit 6814e22b73
2 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,29 @@
Index: linux-2.6-apparmor/security/apparmor/lsm.c
===================================================================
--- linux-2.6-apparmor.orig/security/apparmor/lsm.c
+++ linux-2.6-apparmor/security/apparmor/lsm.c
@@ -810,19 +810,13 @@ static void __exit apparmor_exit(void)
lock_profile(profile);
profile->isstale = 1;
while (!list_empty(&profile->task_contexts)) {
- struct aa_task_context *cxt =
+ struct task_struct *task =
list_entry(profile->task_contexts.next,
- struct aa_task_context, list);
+ struct aa_task_context, list)->task;
- /*
- * Detach the task context from the task. Protect
- * from races by taking the task lock here.
- */
- task_lock(cxt->task);
- rcu_assign_pointer(cxt->task->security, NULL);
- aa_change_task_context(cxt->task, NULL, NULL, 0);
- task_unlock(cxt->task);
- aa_free_task_context_rcu(cxt);
+ task_lock(task);
+ aa_change_task_context(task, NULL, NULL, 0);
+ task_unlock(task);
}
unlock_profile(profile);

View file

@ -112,3 +112,4 @@ rcu-task-context.diff
rcu-task-context-2.diff
no-inline-aa_change_task_context.diff
rcu-task-context-3.diff
rcu-task-context-4.diff