login
Header Space

 
 

on CONFIG_MM_OWNER=y, kernel panic is possible.

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Lee Schermerhorn <Lee.Schermerhorn@...>, KAMEZAWA Hiroyuki <kamezawa.hiroyu@...>, Balbir Singh <balbir@...>, LKML <linux-kernel@...>, linux-mm <linux-mm@...>, Andrew Morton <akpm@...>
Cc: <kosaki.motohiro@...>
Date: Tuesday, May 6, 2008 - 1:40 am

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


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
on CONFIG_MM_OWNER=y, kernel panic is possible., KOSAKI Motohiro, (Tue May 6, 1:40 am)
Re: on CONFIG_MM_OWNER=y, kernel panic is possible., Balbir Singh, (Tue May 6, 1:48 am)
Re: on CONFIG_MM_OWNER=y, kernel panic is possible., KOSAKI Motohiro, (Tue May 6, 2:03 am)
Re: on CONFIG_MM_OWNER=y, kernel panic is possible., Balbir Singh, (Tue May 6, 2:32 am)
Re: on CONFIG_MM_OWNER=y, kernel panic is possible., KOSAKI Motohiro, (Tue May 6, 2:18 am)
Re: on CONFIG_MM_OWNER=y, kernel panic is possible., Balbir Singh, (Tue May 6, 2:28 am)
Re: on CONFIG_MM_OWNER=y, kernel panic is possible., KOSAKI Motohiro, (Tue May 6, 2:43 am)
Re: on CONFIG_MM_OWNER=y, kernel panic is possible., Paul Menage, (Tue May 6, 11:37 pm)
speck-geostationary