summaryrefslogtreecommitdiff
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-06-06 12:20:33 +0200
committerClark Williams <williams@redhat.com>2011-12-28 16:25:36 -0600
commited0a5b1f42e162b61cdaf01c825219023c0da406 (patch)
tree4c1c0a95db4d04c1135e8983d6abba392a0191b2 /kernel/fork.c
parent03a3ef2a7ae0dc733a4a8273c6cdb1f72de62da5 (diff)
sched-mmdrop-delayed.patch
Needs thread context (pgd_lock) -> ifdeffed. workqueues wont work with RT Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 6679093b31e2..56188b0c9d21 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -201,7 +201,7 @@ EXPORT_SYMBOL_GPL(__put_task_struct);
#else
void __put_task_struct_cb(struct rcu_head *rhp)
{
- struct task_struct *tsk = container_of(rhp, struct task_struct, rcu);
+ struct task_struct *tsk = container_of(rhp, struct task_struct, put_rcu);
__put_task_struct(tsk);
@@ -552,6 +552,19 @@ void __mmdrop(struct mm_struct *mm)
}
EXPORT_SYMBOL_GPL(__mmdrop);
+#ifdef CONFIG_PREEMPT_RT_BASE
+/*
+ * RCU callback for delayed mm drop. Not strictly rcu, but we don't
+ * want another facility to make this work.
+ */
+void __mmdrop_delayed(struct rcu_head *rhp)
+{
+ struct mm_struct *mm = container_of(rhp, struct mm_struct, delayed_drop);
+
+ __mmdrop(mm);
+}
+#endif
+
/*
* Decrement the use count and release all resources for an mm.
*/