A patch for the file kernel/fork.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux