diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-03-17 18:06:02 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-04-09 10:29:12 -0400 |
commit | 87df842410ce5a86fdca9fbec0dba80d2aa88b6f (patch) | |
tree | e8d311184e8f2695a961935882ad5269724fce04 /fs/proc | |
parent | 2eaa9cfdf33b8d7fb7aff27792192e0019ae8fc6 (diff) |
procfs: Kill BKL in llseek on proc base
We don't use the BKL elsewhere, so use generic_file_llseek
so we can avoid default_llseek taking the BKL.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[restore proc_fdinfo_file_operations as non-seekable]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: John Kacur <jkacur@redhat.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index a7310841c831..95d91cf3e24c 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -728,6 +728,7 @@ out_no_task: | |||
728 | 728 | ||
729 | static const struct file_operations proc_info_file_operations = { | 729 | static const struct file_operations proc_info_file_operations = { |
730 | .read = proc_info_read, | 730 | .read = proc_info_read, |
731 | .llseek = generic_file_llseek, | ||
731 | }; | 732 | }; |
732 | 733 | ||
733 | static int proc_single_show(struct seq_file *m, void *v) | 734 | static int proc_single_show(struct seq_file *m, void *v) |
@@ -985,6 +986,7 @@ out_no_task: | |||
985 | 986 | ||
986 | static const struct file_operations proc_environ_operations = { | 987 | static const struct file_operations proc_environ_operations = { |
987 | .read = environ_read, | 988 | .read = environ_read, |
989 | .llseek = generic_file_llseek, | ||
988 | }; | 990 | }; |
989 | 991 | ||
990 | static ssize_t oom_adjust_read(struct file *file, char __user *buf, | 992 | static ssize_t oom_adjust_read(struct file *file, char __user *buf, |
@@ -1058,6 +1060,7 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf, | |||
1058 | static const struct file_operations proc_oom_adjust_operations = { | 1060 | static const struct file_operations proc_oom_adjust_operations = { |
1059 | .read = oom_adjust_read, | 1061 | .read = oom_adjust_read, |
1060 | .write = oom_adjust_write, | 1062 | .write = oom_adjust_write, |
1063 | .llseek = generic_file_llseek, | ||
1061 | }; | 1064 | }; |
1062 | 1065 | ||
1063 | #ifdef CONFIG_AUDITSYSCALL | 1066 | #ifdef CONFIG_AUDITSYSCALL |
@@ -1129,6 +1132,7 @@ out_free_page: | |||
1129 | static const struct file_operations proc_loginuid_operations = { | 1132 | static const struct file_operations proc_loginuid_operations = { |
1130 | .read = proc_loginuid_read, | 1133 | .read = proc_loginuid_read, |
1131 | .write = proc_loginuid_write, | 1134 | .write = proc_loginuid_write, |
1135 | .llseek = generic_file_llseek, | ||
1132 | }; | 1136 | }; |
1133 | 1137 | ||
1134 | static ssize_t proc_sessionid_read(struct file * file, char __user * buf, | 1138 | static ssize_t proc_sessionid_read(struct file * file, char __user * buf, |
@@ -1149,6 +1153,7 @@ static ssize_t proc_sessionid_read(struct file * file, char __user * buf, | |||
1149 | 1153 | ||
1150 | static const struct file_operations proc_sessionid_operations = { | 1154 | static const struct file_operations proc_sessionid_operations = { |
1151 | .read = proc_sessionid_read, | 1155 | .read = proc_sessionid_read, |
1156 | .llseek = generic_file_llseek, | ||
1152 | }; | 1157 | }; |
1153 | #endif | 1158 | #endif |
1154 | 1159 | ||
@@ -1200,6 +1205,7 @@ static ssize_t proc_fault_inject_write(struct file * file, | |||
1200 | static const struct file_operations proc_fault_inject_operations = { | 1205 | static const struct file_operations proc_fault_inject_operations = { |
1201 | .read = proc_fault_inject_read, | 1206 | .read = proc_fault_inject_read, |
1202 | .write = proc_fault_inject_write, | 1207 | .write = proc_fault_inject_write, |
1208 | .llseek = generic_file_llseek, | ||
1203 | }; | 1209 | }; |
1204 | #endif | 1210 | #endif |
1205 | 1211 | ||
@@ -1941,7 +1947,7 @@ static ssize_t proc_fdinfo_read(struct file *file, char __user *buf, | |||
1941 | } | 1947 | } |
1942 | 1948 | ||
1943 | static const struct file_operations proc_fdinfo_file_operations = { | 1949 | static const struct file_operations proc_fdinfo_file_operations = { |
1944 | .open = nonseekable_open, | 1950 | .open = nonseekable_open, |
1945 | .read = proc_fdinfo_read, | 1951 | .read = proc_fdinfo_read, |
1946 | }; | 1952 | }; |
1947 | 1953 | ||
@@ -2225,6 +2231,7 @@ out_no_task: | |||
2225 | static const struct file_operations proc_pid_attr_operations = { | 2231 | static const struct file_operations proc_pid_attr_operations = { |
2226 | .read = proc_pid_attr_read, | 2232 | .read = proc_pid_attr_read, |
2227 | .write = proc_pid_attr_write, | 2233 | .write = proc_pid_attr_write, |
2234 | .llseek = generic_file_llseek, | ||
2228 | }; | 2235 | }; |
2229 | 2236 | ||
2230 | static const struct pid_entry attr_dir_stuff[] = { | 2237 | static const struct pid_entry attr_dir_stuff[] = { |
@@ -2345,6 +2352,7 @@ static ssize_t proc_coredump_filter_write(struct file *file, | |||
2345 | static const struct file_operations proc_coredump_filter_operations = { | 2352 | static const struct file_operations proc_coredump_filter_operations = { |
2346 | .read = proc_coredump_filter_read, | 2353 | .read = proc_coredump_filter_read, |
2347 | .write = proc_coredump_filter_write, | 2354 | .write = proc_coredump_filter_write, |
2355 | .llseek = generic_file_llseek, | ||
2348 | }; | 2356 | }; |
2349 | #endif | 2357 | #endif |
2350 | 2358 | ||