Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1260842 > unrolled thread
| Started by | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| First post | 2015-11-02 19:00 +0100 |
| Last post | 2015-11-02 19:00 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: question about commit "proc: make proc_fd_permission() thread-friendly" Oleg Nesterov <oleg@redhat.com> - 2015-11-02 19:00 +0100
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Date | 2015-11-02 19:00 +0100 |
| Subject | Re: question about commit "proc: make proc_fd_permission() thread-friendly" |
| Message-ID | <qqryF-8gz-9@gated-at.bofh.it> |
Hi Jin, (add lkml) On 11/02, Jin, Yihua wrote: > > --- a/fs/proc/fd.c<http://kernel.suse.com/cgit/kernel/tree/fs/proc/fd.c?h=SLE12&id=a3c039929d01f793c47922017b6c0ae438e11598> > +++ b/fs/proc/fd.c<http://kernel.suse.com/cgit/kernel/tree/fs/proc/fd.c?h=SLE12&id=96d0df79f2644fc823f26c06491e182d87a90c2a> > @@ -286,7 +286,7 @@ int proc_fd_permission(struct inode *inode, int mask) > int rv = generic_permission(inode, mask); > if (rv == 0) > return 0; > - if (task_pid(current) == proc_pid(inode)) > + if (task_tgid(current) == proc_pid(inode)) > rv = 0; > return rv; > } > > I understand the intention is to make sub-thread access /proc/self/fd/ OK, however, after this commit, access /proc/<tid>/fd/ is denied if the process is non-dumpable. > > This make application in a delimma: > Before your commit, application sub-thread can access /proc/<tid>/fd/, but not /proc/self/fd/, after your commit, application sub-thread can access /proc/self/fd/, but not /proc/<tid>/fd/. > This make application impossible to adapt both to kernel before the commit and kernel after the commit. Yes thanks... I'll try to think tomorrow. Oleg. -- 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/
Back to top | Article view | linux.kernel
csiph-web