public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* A patch for the file kernel/fork.c
@ 2005-05-04 14:46 André Pereira de Almeida
  2005-05-04 17:54 ` Chris Wedgwood
  0 siblings, 1 reply; 15+ messages in thread
From: André Pereira de Almeida @ 2005-05-04 14:46 UTC (permalink / raw)
  To: linux-kernel

  I think that the file kernel/fork.c should be patched as following:

--- linux-2.6.12-rc3.orig/kernel/fork.c 2005-05-03 22:31:21.000000000 -0300
+++ linux-2.6.12-rc3/kernel/fork.c      2005-05-04 09:37:46.000000000 -0300
@@ -429,7 +429,7 @@
                tsk->vfork_done = NULL;
                complete(vfork_done);
        }
-       if (tsk->clear_child_tid && atomic_read(&mm->mm_users) > 1) {
+       if (mm && tsk->clear_child_tid && atomic_read(&mm->mm_users) > 1) {
                u32 __user * tidptr = tsk->clear_child_tid;
                tsk->clear_child_tid = NULL;

If a process is killed and, for some reason, when closing all files a 
pagefault is generated (should not happen, but...) after the function 
exit_mm had been called, the kernel will try to exit this process again, 
calling exit_mm and mm_release with a null mm, and will generate another 
pagefault in atomic_read(&mm->mm_users), and so on and the system will 
hang. I think this patch solve this problem.

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

end of thread, other threads:[~2005-05-07  1:09 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-04 14:46 A patch for the file kernel/fork.c André Pereira de Almeida
2005-05-04 17:54 ` Chris Wedgwood
2005-05-04 18:26   ` André Pereira de Almeida
2005-05-04 18:43     ` Chris Wedgwood
2005-05-04 19:04       ` André Pereira de Almeida
2005-05-04 19:16         ` Alexander Nyberg
2005-05-04 19:41           ` Andrew Morton
2005-05-04 20:54             ` André Pereira de Almeida
2005-05-04 21:21             ` Alexander Nyberg
2005-05-05 13:48               ` Steven Rostedt
2005-05-05 15:32                 ` Alexander Nyberg
2005-05-07  1:08                   ` Andrew Morton
2005-05-04 19:11     ` Valdis.Kletnieks
2005-05-04 19:34       ` Dmitry Torokhov
2005-05-04 19:35       ` André Pereira de Almeida

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox