Lines Matching refs:task

28 	struct task_struct *task;  in seq_show()  local
30 task = get_proc_task(m->private); in seq_show()
31 if (!task) in seq_show()
34 task_lock(task); in seq_show()
35 files = task->files; in seq_show()
51 task_unlock(task); in seq_show()
52 put_task_struct(task); in seq_show()
89 struct task_struct *task = get_proc_task(inode); in proc_fdinfo_permission() local
91 if (!task) in proc_fdinfo_permission()
94 allowed = ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS); in proc_fdinfo_permission()
95 put_task_struct(task); in proc_fdinfo_permission()
115 static bool tid_fd_mode(struct task_struct *task, unsigned fd, fmode_t *mode) in tid_fd_mode() argument
119 file = fget_task(task, fd); in tid_fd_mode()
127 static void tid_fd_update_inode(struct task_struct *task, struct inode *inode, in tid_fd_update_inode() argument
130 task_dump_owner(task, 0, &inode->i_uid, &inode->i_gid); in tid_fd_update_inode()
140 security_task_to_inode(task, inode); in tid_fd_update_inode()
145 struct task_struct *task; in tid_fd_revalidate() local
153 task = get_proc_task(inode); in tid_fd_revalidate()
156 if (task) { in tid_fd_revalidate()
158 if (tid_fd_mode(task, fd, &f_mode)) { in tid_fd_revalidate()
159 tid_fd_update_inode(task, inode, f_mode); in tid_fd_revalidate()
160 put_task_struct(task); in tid_fd_revalidate()
163 put_task_struct(task); in tid_fd_revalidate()
175 struct task_struct *task; in proc_fd_link() local
178 task = get_proc_task(d_inode(dentry)); in proc_fd_link()
179 if (task) { in proc_fd_link()
183 fd_file = fget_task(task, fd); in proc_fd_link()
190 put_task_struct(task); in proc_fd_link()
202 struct task_struct *task, const void *ptr) in proc_fd_instantiate() argument
208 inode = proc_pid_make_inode(dentry->d_sb, task, S_IFLNK); in proc_fd_instantiate()
219 tid_fd_update_inode(task, inode, data->mode); in proc_fd_instantiate()
229 struct task_struct *task = get_proc_task(dir); in proc_lookupfd_common() local
233 if (!task) in proc_lookupfd_common()
237 if (!tid_fd_mode(task, data.fd, &data.mode)) in proc_lookupfd_common()
240 result = instantiate(dentry, task, &data); in proc_lookupfd_common()
242 put_task_struct(task); in proc_lookupfd_common()
376 struct task_struct *task, const void *ptr) in proc_fdinfo_instantiate() argument
382 inode = proc_pid_make_inode(dentry->d_sb, task, S_IFREG | S_IRUGO); in proc_fdinfo_instantiate()
392 tid_fd_update_inode(task, inode, 0); in proc_fdinfo_instantiate()