linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* on CONFIG_MM_OWNER=y, kernel panic is possible.
@ 2008-05-06  5:40 KOSAKI Motohiro
  2008-05-06  5:48 ` Balbir Singh
  0 siblings, 1 reply; 10+ messages in thread
From: KOSAKI Motohiro @ 2008-05-06  5:40 UTC (permalink / raw)
  To: Lee Schermerhorn, KAMEZAWA Hiroyuki, Balbir Singh, LKML, linux-mm,
	Andrew Morton
  Cc: kosaki.motohiro

on CONFIG_MM_OWNER=y (that is automatically turned on by mem-cgroup),
kernel panic is possible by following scenario in mm_update_next_owner().

1. mm_update_next_owner() is called.
2. found caller task in do_each_thread() loop.
3. thus, BUG_ON(c == p) is true, it become kernel panic.

end up, We should left out current task.


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
CC: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
CC: Balbir Singh <balbir@linux.vnet.ibm.com>

---
 kernel/exit.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/kernel/exit.c
===================================================================
--- a/kernel/exit.c     2008-05-04 22:57:23.000000000 +0900
+++ b/kernel/exit.c     2008-05-06 15:01:26.000000000 +0900
@@ -627,7 +627,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);


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-05-08 13:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-06  5:40 on CONFIG_MM_OWNER=y, kernel panic is possible KOSAKI Motohiro
2008-05-06  5:48 ` Balbir Singh
2008-05-06  6:03   ` KOSAKI Motohiro
2008-05-06  6:18     ` KOSAKI Motohiro
2008-05-06  6:28       ` Balbir Singh
2008-05-06  6:43         ` KOSAKI Motohiro
2008-05-07  3:37           ` Paul Menage
2008-05-07 23:55             ` [PATCH] on CONFIG_MM_OWNER=y, kernel panic is possible. take2 KOSAKI Motohiro
2008-05-08 13:53               ` Balbir Singh
2008-05-06  6:32     ` on CONFIG_MM_OWNER=y, kernel panic is possible Balbir Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).