mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Add changes missing in rcu-task-context-2.diff
This commit is contained in:
parent
98f6ce46d1
commit
6814e22b73
2 changed files with 30 additions and 0 deletions
29
kernel-patches/for-mainline/rcu-task-context-4.diff
Normal file
29
kernel-patches/for-mainline/rcu-task-context-4.diff
Normal 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);
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue