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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <80341664FB79C2419999599F48F738410227327888@HKMAIL01.nvidia.com>
Date:	Wed, 16 Apr 2014 20:52:17 +0800
From:	Peter Chiang <pchiang@...dia.com>
To:	"ccross@...roid.com" <ccross@...roid.com>,
	"lizefan@...wei.com" <lizefan@...wei.com>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"oleg@...hat.com" <oleg@...hat.com>,
	"tj@...nel.org" <tj@...nel.org>, "pavel@....cz" <pavel@....cz>,
	"ebiederm@...ssion.com" <ebiederm@...ssion.com>,
	"guillaume@...infr.org" <guillaume@...infr.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] mm : Avoid candidate task is equal to current task

Is it possible  before exit_mm() set tsk->mm to NULL, tsk->mm has already been NULL ?

-----Original Message-----
From: Peter Chiang 
Sent: Wednesday, April 16, 2014 8:31 PM
To: Peter Chiang; ccross@...roid.com; lizefan@...wei.com; akpm@...ux-foundation.org; oleg@...hat.com; tj@...nel.org; pavel@....cz; ebiederm@...ssion.com; guillaume@...infr.org
Cc: linux-kernel@...r.kernel.org
Subject: RE: [PATCH] mm : Avoid candidate task is equal to current task

mm_update_next_owner() call from exit_mm() , and exit_mm()  change tsk->mm to NULL If p==c , It seems to be  impossible that mm == c->mm  (tsk->mm) . Because mm is non-NULL and  c->mm is NULL . 


-----Original Message-----
From: Peter Chiang [mailto:pchiang@...dia.com]
Sent: Wednesday, April 16, 2014 11:03 AM
To: ccross@...roid.com; Peter Chiang; lizefan@...wei.com; akpm@...ux-foundation.org; oleg@...hat.com; tj@...nel.org; pavel@....cz; ebiederm@...ssion.com; guillaume@...infr.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] mm : Avoid candidate task is equal to current task

From: pchiang <pchiang@...dia.com>

Fix kernel panic when finding a new owner for the mm and the new owner is equal to current onwer

Signed-off-by: pchiang <pchiang@...dia.com>
---
 kernel/exit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/exit.c b/kernel/exit.c index 6ed6a1d..aa98422 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -399,7 +399,7 @@ retry:
 	 * here often
 	 */
 	do_each_thread(g, c) {
-		if (c->mm == mm)
+		if ((c != p) && (c->mm == mm))
 			goto assign_new_owner;
 	} while_each_thread(g, c);
 
--
1.8.1.5

--
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