diff options
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r-- | fs/proc/base.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 8418fcc0a6ab..acb7ef80ea4f 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -166,18 +166,6 @@ static int get_fs_path(struct task_struct *task, struct path *path, bool root) | |||
166 | return result; | 166 | return result; |
167 | } | 167 | } |
168 | 168 | ||
169 | static int get_nr_threads(struct task_struct *tsk) | ||
170 | { | ||
171 | unsigned long flags; | ||
172 | int count = 0; | ||
173 | |||
174 | if (lock_task_sighand(tsk, &flags)) { | ||
175 | count = atomic_read(&tsk->signal->count); | ||
176 | unlock_task_sighand(tsk, &flags); | ||
177 | } | ||
178 | return count; | ||
179 | } | ||
180 | |||
181 | static int proc_cwd_link(struct inode *inode, struct path *path) | 169 | static int proc_cwd_link(struct inode *inode, struct path *path) |
182 | { | 170 | { |
183 | struct task_struct *task = get_proc_task(inode); | 171 | struct task_struct *task = get_proc_task(inode); |
@@ -730,6 +718,7 @@ out_no_task: | |||
730 | 718 | ||
731 | static const struct file_operations proc_info_file_operations = { | 719 | static const struct file_operations proc_info_file_operations = { |
732 | .read = proc_info_read, | 720 | .read = proc_info_read, |
721 | .llseek = generic_file_llseek, | ||
733 | }; | 722 | }; |
734 | 723 | ||
735 | static int proc_single_show(struct seq_file *m, void *v) | 724 | static int proc_single_show(struct seq_file *m, void *v) |
@@ -987,6 +976,7 @@ out_no_task: | |||
987 | 976 | ||
988 | static const struct file_operations proc_environ_operations = { | 977 | static const struct file_operations proc_environ_operations = { |
989 | .read = environ_read, | 978 | .read = environ_read, |
979 | .llseek = generic_file_llseek, | ||
990 | }; | 980 | }; |
991 | 981 | ||
992 | static ssize_t oom_adjust_read(struct file *file, char __user *buf, | 982 | static ssize_t oom_adjust_read(struct file *file, char __user *buf, |
@@ -1060,6 +1050,7 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf, | |||
1060 | static const struct file_operations proc_oom_adjust_operations = { | 1050 | static const struct file_operations proc_oom_adjust_operations = { |
1061 | .read = oom_adjust_read, | 1051 | .read = oom_adjust_read, |
1062 | .write = oom_adjust_write, | 1052 | .write = oom_adjust_write, |
1053 | .llseek = generic_file_llseek, | ||
1063 | }; | 1054 | }; |
1064 | 1055 | ||
1065 | #ifdef CONFIG_AUDITSYSCALL | 1056 | #ifdef CONFIG_AUDITSYSCALL |
@@ -1131,6 +1122,7 @@ out_free_page: | |||
1131 | static const struct file_operations proc_loginuid_operations = { | 1122 | static const struct file_operations proc_loginuid_operations = { |
1132 | .read = proc_loginuid_read, | 1123 | .read = proc_loginuid_read, |
1133 | .write = proc_loginuid_write, | 1124 | .write = proc_loginuid_write, |
1125 | .llseek = generic_file_llseek, | ||
1134 | }; | 1126 | }; |
1135 | 1127 | ||
1136 | static ssize_t proc_sessionid_read(struct file * file, char __user * buf, | 1128 | static ssize_t proc_sessionid_read(struct file * file, char __user * buf, |
@@ -1151,6 +1143,7 @@ static ssize_t proc_sessionid_read(struct file * file, char __user * buf, | |||
1151 | 1143 | ||
1152 | static const struct file_operations proc_sessionid_operations = { | 1144 | static const struct file_operations proc_sessionid_operations = { |
1153 | .read = proc_sessionid_read, | 1145 | .read = proc_sessionid_read, |
1146 | .llseek = generic_file_llseek, | ||
1154 | }; | 1147 | }; |
1155 | #endif | 1148 | #endif |
1156 | 1149 | ||
@@ -1202,6 +1195,7 @@ static ssize_t proc_fault_inject_write(struct file * file, | |||
1202 | static const struct file_operations proc_fault_inject_operations = { | 1195 | static const struct file_operations proc_fault_inject_operations = { |
1203 | .read = proc_fault_inject_read, | 1196 | .read = proc_fault_inject_read, |
1204 | .write = proc_fault_inject_write, | 1197 | .write = proc_fault_inject_write, |
1198 | .llseek = generic_file_llseek, | ||
1205 | }; | 1199 | }; |
1206 | #endif | 1200 | #endif |
1207 | 1201 | ||
@@ -1943,7 +1937,7 @@ static ssize_t proc_fdinfo_read(struct file *file, char __user *buf, | |||
1943 | } | 1937 | } |
1944 | 1938 | ||
1945 | static const struct file_operations proc_fdinfo_file_operations = { | 1939 | static const struct file_operations proc_fdinfo_file_operations = { |
1946 | .open = nonseekable_open, | 1940 | .open = nonseekable_open, |
1947 | .read = proc_fdinfo_read, | 1941 | .read = proc_fdinfo_read, |
1948 | }; | 1942 | }; |
1949 | 1943 | ||
@@ -2227,6 +2221,7 @@ out_no_task: | |||
2227 | static const struct file_operations proc_pid_attr_operations = { | 2221 | static const struct file_operations proc_pid_attr_operations = { |
2228 | .read = proc_pid_attr_read, | 2222 | .read = proc_pid_attr_read, |
2229 | .write = proc_pid_attr_write, | 2223 | .write = proc_pid_attr_write, |
2224 | .llseek = generic_file_llseek, | ||
2230 | }; | 2225 | }; |
2231 | 2226 | ||
2232 | static const struct pid_entry attr_dir_stuff[] = { | 2227 | static const struct pid_entry attr_dir_stuff[] = { |
@@ -2347,6 +2342,7 @@ static ssize_t proc_coredump_filter_write(struct file *file, | |||
2347 | static const struct file_operations proc_coredump_filter_operations = { | 2342 | static const struct file_operations proc_coredump_filter_operations = { |
2348 | .read = proc_coredump_filter_read, | 2343 | .read = proc_coredump_filter_read, |
2349 | .write = proc_coredump_filter_write, | 2344 | .write = proc_coredump_filter_write, |
2345 | .llseek = generic_file_llseek, | ||
2350 | }; | 2346 | }; |
2351 | #endif | 2347 | #endif |
2352 | 2348 | ||
@@ -2436,7 +2432,7 @@ static struct dentry *proc_base_instantiate(struct inode *dir, | |||
2436 | const struct pid_entry *p = ptr; | 2432 | const struct pid_entry *p = ptr; |
2437 | struct inode *inode; | 2433 | struct inode *inode; |
2438 | struct proc_inode *ei; | 2434 | struct proc_inode *ei; |
2439 | struct dentry *error = ERR_PTR(-EINVAL); | 2435 | struct dentry *error; |
2440 | 2436 | ||
2441 | /* Allocate the inode */ | 2437 | /* Allocate the inode */ |
2442 | error = ERR_PTR(-ENOMEM); | 2438 | error = ERR_PTR(-ENOMEM); |
@@ -2786,7 +2782,7 @@ out: | |||
2786 | 2782 | ||
2787 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) | 2783 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) |
2788 | { | 2784 | { |
2789 | struct dentry *result = ERR_PTR(-ENOENT); | 2785 | struct dentry *result; |
2790 | struct task_struct *task; | 2786 | struct task_struct *task; |
2791 | unsigned tgid; | 2787 | unsigned tgid; |
2792 | struct pid_namespace *ns; | 2788 | struct pid_namespace *ns; |