lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 28 Feb 2007 10:17:44 +0530
From:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
To:	Andrew Morton <akpm@...ux-foundation.org>, andi@...stfloor.org
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] init_new_context: Use the passed task argument  


Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@...ux.vnet.ibm.com>
---
 arch/i386/kernel/ldt.c   |    2 +-
 arch/x86_64/kernel/ldt.c |    2 +-
 kernel/fork.c            |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/i386/kernel/ldt.c b/arch/i386/kernel/ldt.c
index b410e5f..925354c 100644
--- a/arch/i386/kernel/ldt.c
+++ b/arch/i386/kernel/ldt.c
@@ -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);
diff --git a/arch/x86_64/kernel/ldt.c b/arch/x86_64/kernel/ldt.c
index d7e5d0c..16ae79d 100644
--- a/arch/x86_64/kernel/ldt.c
+++ b/arch/x86_64/kernel/ldt.c
@@ -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);
diff --git a/kernel/fork.c b/kernel/fork.c
index d154cc7..2184ef5 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -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;
 
-- 
1.5.0.1.227.g99d42-dirty

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ