On Tue, 15 Aug 2006 14:22:25 -0700
Andrew Morton <[email protected]> wrote:
> On Mon, 14 Aug 2006 13:27:31 +0200 (CEST)
> Andi Kleen <[email protected]> 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.
hm, that's wrong, isn't it - we're not using CLONE_FILES...
So what we have is a copy of init_files. So the sys_close(0) shouldn't be needed?
-
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]