lkml.org 
[lkml]   [2006]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] [2/3] Create call_usermodehelper_pipe()
    On Mon, 14 Aug 2006 13:27:31 +0200 (CEST)
    Andi Kleen <ak@suse.de> wrote:

    > + /* Install input pipe when needed */
    > + if (sub_info->stdin) {
    > + struct files_struct *f = current->files;
    > + struct fdtable *fdt;
    > + /* no races because files should be private here */
    > + sys_close(0);
    > + fd_install(0, sub_info->stdin);
    > + spin_lock(&f->file_lock);
    > + fdt = files_fdtable(f);
    > + FD_SET(0, fdt->open_fds);
    > + FD_CLR(0, fdt->close_on_exec);
    > + spin_unlock(&f->file_lock);
    > + }

    This is all going to be run by kernel threads, and all kernel threads share
    current->files=&init_files.

    So I suspect that if two coredumps happen at the same time bad things will
    happen. Like a BUG() in fd_install()?

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-08-15 23:25    [W:0.020 / U:1.956 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site