[lkml]   [2002]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subject[RFC] Race condition?
    Is there a race condition in this piece of code from do_fork in
    linux/kernel/fork.c? I cannot see what prevents two processes
    from calling this at the same time and both successfully fork
    even though the user had only one process left.

    if (atomic_read(&p->user->processes) >= p->rlim[RLIMIT_NPROC].rlim_cur
    && !capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE))
    goto bad_fork_free;


    Kasper Dupont -- der bruger for meget tid på usenet.
    For sending spam use
    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 13:27    [W:0.020 / U:13.908 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site