]> git.hungrycats.org Git - linux/commitdiff
Fix fork failure case.
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 14 Sep 2004 02:04:35 +0000 (19:04 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 14 Sep 2004 02:04:35 +0000 (19:04 -0700)
It would clear the segment registers in the parent, which
wasn't really intentional. Noticed by Andries Brouwer.

kernel/fork.c

index 78db8811c8341bcfc3acb1c223f3796774a47813..55c219720816bbc2178cb5eb7e8b6e63fc5a200b 100644 (file)
@@ -1144,9 +1144,7 @@ fork_out:
 bad_fork_cleanup_namespace:
        exit_namespace(p);
 bad_fork_cleanup_mm:
-       exit_mm(p);
-       if (p->active_mm)
-               mmdrop(p->active_mm);
+       mmput(mm);
 bad_fork_cleanup_signal:
        exit_signal(p);
 bad_fork_cleanup_sighand: