[lkml]   [2001]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] handling of failed copy_thread() in do_fork()
    	If copy_thread() fails (it can't happen on x86, but on other
    architectures, e.g. on sparc, it's possible) do_fork() doesn't do
    full cleanup - it forgets to do exit_mm(). Obvious fix follows.
    Please, apply.

    diff -urN S4-pre7/kernel/fork.c S4-pre7-fork/kernel/fork.c
    --- S4-pre7/kernel/fork.c Wed Apr 25 20:43:12 2001
    +++ S4-pre7-fork/kernel/fork.c Wed Apr 25 22:12:39 2001
    @@ -652,7 +652,7 @@
    goto bad_fork_cleanup_sighand;
    retval = copy_thread(0, clone_flags, stack_start, stack_size, p, regs);
    if (retval)
    - goto bad_fork_cleanup_sighand;
    + goto bad_fork_cleanup_mm;
    p->semundo = NULL;

    /* Our parent execution domain becomes current domain
    @@ -708,6 +708,8 @@
    return retval;

    + exit_mm(p);
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:52    [W:2.863 / U:0.460 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site