Lines Matching full:task
26 struct task_struct *task; in seq_show() local
28 task = get_proc_task(m->private); in seq_show()
29 if (!task) in seq_show()
32 task_lock(task); in seq_show()
33 files = task->files; in seq_show()
51 task_unlock(task); in seq_show()
52 put_task_struct(task); in seq_show()
78 struct task_struct *task = get_proc_task(inode); in proc_fdinfo_access_allowed() local
80 if (!task) in proc_fdinfo_access_allowed()
83 allowed = ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS); in proc_fdinfo_access_allowed()
84 put_task_struct(task); in proc_fdinfo_access_allowed()
109 static bool tid_fd_mode(struct task_struct *task, unsigned fd, fmode_t *mode) in tid_fd_mode() argument
114 file = task_lookup_fd_rcu(task, fd); in tid_fd_mode()
121 static void tid_fd_update_inode(struct task_struct *task, struct inode *inode, in tid_fd_update_inode() argument
124 task_dump_owner(task, 0, &inode->i_uid, &inode->i_gid); in tid_fd_update_inode()
134 security_task_to_inode(task, inode); in tid_fd_update_inode()
139 struct task_struct *task; in tid_fd_revalidate() local
147 task = get_proc_task(inode); in tid_fd_revalidate()
150 if (task) { in tid_fd_revalidate()
152 if (tid_fd_mode(task, fd, &f_mode)) { in tid_fd_revalidate()
153 tid_fd_update_inode(task, inode, f_mode); in tid_fd_revalidate()
154 put_task_struct(task); in tid_fd_revalidate()
157 put_task_struct(task); in tid_fd_revalidate()
169 struct task_struct *task; in proc_fd_link() local
172 task = get_proc_task(d_inode(dentry)); in proc_fd_link()
173 if (task) { in proc_fd_link()
177 fd_file = fget_task(task, fd); in proc_fd_link()
184 put_task_struct(task); in proc_fd_link()
196 struct task_struct *task, const void *ptr) in proc_fd_instantiate() argument
202 inode = proc_pid_make_inode(dentry->d_sb, task, S_IFLNK); in proc_fd_instantiate()
213 tid_fd_update_inode(task, inode, data->mode); in proc_fd_instantiate()
223 struct task_struct *task = get_proc_task(dir); in proc_lookupfd_common() local
227 if (!task) in proc_lookupfd_common()
231 if (!tid_fd_mode(task, data.fd, &data.mode)) in proc_lookupfd_common()
234 result = instantiate(dentry, task, &data); in proc_lookupfd_common()
236 put_task_struct(task); in proc_lookupfd_common()
329 struct task_struct *task, const void *ptr) in proc_fdinfo_instantiate() argument
335 inode = proc_pid_make_inode(dentry->d_sb, task, S_IFREG | S_IRUGO); in proc_fdinfo_instantiate()
343 tid_fd_update_inode(task, inode, 0); in proc_fdinfo_instantiate()