init_new_context: Use the passed task argument
Subsystems (3)
PATCH 1/1 init_new_context: Use the passed task argument
Signed-off-by Aneesh Kumar K.V <[email protected]>
--- arch/i386/kernel/ldt.c | 2 +- arch/x86_64/kernel/ldt.c | 2 +- kernel/fork.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
arch/i386/kernel/ldt.c +1 -1
@@ -97,7 +97,7 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)init_MUTEX (&mm->context.sem); mm->context.size =0 ; - old_mm = current->mm; + old_mm = tsk->mm;if (old_mm && old_mm->context.size >0 ) {down (&old_mm->context.sem); retval =copy_ldt (&mm->context, &old_mm->context);
arch/x86_64/kernel/ldt.c +1 -1
@@ -101,7 +101,7 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)init_MUTEX (&mm->context.sem); mm->context.size =0 ; - old_mm = current->mm; + old_mm = tsk->mm;if (old_mm && old_mm->context.size >0 ) {down (&old_mm->context.sem); retval =copy_ldt (&mm->context, &old_mm->context);
kernel/fork.c +2 -2
@@ -477,7 +477,7 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)*/ static struct mm_struct *dup_mm (struct task_struct *tsk) { -struct mm_struct *mm, *oldmm = current->mm; +struct mm_struct *mm, *oldmm = tsk->mm;int err;if (!oldmm)
@@ -551,7 +551,7 @@ static int copy_mm(unsigned long clone_flags, struct task_struct * tsk) } retval = -ENOMEM ; - mm =dup_mm (tsk); + mm =dup_mm (current);if (!mm) goto fail_nomem;
Signature · 1 line
1.5.0.1.227.g99d42-dirty