Lines Matching refs: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 seq_fdinfo_open() local
80 if (!task) in seq_fdinfo_open()
83 allowed = ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS); in seq_fdinfo_open()
84 put_task_struct(task); in seq_fdinfo_open()
99 static bool tid_fd_mode(struct task_struct *task, unsigned fd, fmode_t *mode) in tid_fd_mode() argument
104 file = task_lookup_fd_rcu(task, fd); in tid_fd_mode()
111 static void tid_fd_update_inode(struct task_struct *task, struct inode *inode, in tid_fd_update_inode() argument
114 task_dump_owner(task, 0, &inode->i_uid, &inode->i_gid); in tid_fd_update_inode()
124 security_task_to_inode(task, inode); in tid_fd_update_inode()
129 struct task_struct *task; in tid_fd_revalidate() local
137 task = get_proc_task(inode); in tid_fd_revalidate()
140 if (task) { in tid_fd_revalidate()
142 if (tid_fd_mode(task, fd, &f_mode)) { in tid_fd_revalidate()
143 tid_fd_update_inode(task, inode, f_mode); in tid_fd_revalidate()
144 put_task_struct(task); in tid_fd_revalidate()
147 put_task_struct(task); in tid_fd_revalidate()
159 struct task_struct *task; in proc_fd_link() local
162 task = get_proc_task(d_inode(dentry)); in proc_fd_link()
163 if (task) { in proc_fd_link()
167 fd_file = fget_task(task, fd); in proc_fd_link()
174 put_task_struct(task); in proc_fd_link()
186 struct task_struct *task, const void *ptr) in proc_fd_instantiate() argument
192 inode = proc_pid_make_inode(dentry->d_sb, task, S_IFLNK); in proc_fd_instantiate()
203 tid_fd_update_inode(task, inode, data->mode); in proc_fd_instantiate()
213 struct task_struct *task = get_proc_task(dir); in proc_lookupfd_common() local
217 if (!task) in proc_lookupfd_common()
221 if (!tid_fd_mode(task, data.fd, &data.mode)) in proc_lookupfd_common()
224 result = instantiate(dentry, task, &data); in proc_lookupfd_common()
226 put_task_struct(task); in proc_lookupfd_common()
319 struct task_struct *task, const void *ptr) in proc_fdinfo_instantiate() argument
325 inode = proc_pid_make_inode(dentry->d_sb, task, S_IFREG | S_IRUGO); in proc_fdinfo_instantiate()
333 tid_fd_update_inode(task, inode, 0); in proc_fdinfo_instantiate()