diff options
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 10 | ||||
-rw-r--r-- | fs/proc/inode.c | 4 | ||||
-rw-r--r-- | fs/proc/kcore.c | 1 | ||||
-rw-r--r-- | fs/proc/kmsg.c | 1 | ||||
-rw-r--r-- | fs/proc/vmcore.c | 1 |
5 files changed, 14 insertions, 3 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 8418fcc0a6ab..c7f9f23449dc 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -730,6 +730,7 @@ out_no_task: | |||
730 | 730 | ||
731 | static const struct file_operations proc_info_file_operations = { | 731 | static const struct file_operations proc_info_file_operations = { |
732 | .read = proc_info_read, | 732 | .read = proc_info_read, |
733 | .llseek = generic_file_llseek, | ||
733 | }; | 734 | }; |
734 | 735 | ||
735 | static int proc_single_show(struct seq_file *m, void *v) | 736 | static int proc_single_show(struct seq_file *m, void *v) |
@@ -987,6 +988,7 @@ out_no_task: | |||
987 | 988 | ||
988 | static const struct file_operations proc_environ_operations = { | 989 | static const struct file_operations proc_environ_operations = { |
989 | .read = environ_read, | 990 | .read = environ_read, |
991 | .llseek = generic_file_llseek, | ||
990 | }; | 992 | }; |
991 | 993 | ||
992 | static ssize_t oom_adjust_read(struct file *file, char __user *buf, | 994 | static ssize_t oom_adjust_read(struct file *file, char __user *buf, |
@@ -1060,6 +1062,7 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf, | |||
1060 | static const struct file_operations proc_oom_adjust_operations = { | 1062 | static const struct file_operations proc_oom_adjust_operations = { |
1061 | .read = oom_adjust_read, | 1063 | .read = oom_adjust_read, |
1062 | .write = oom_adjust_write, | 1064 | .write = oom_adjust_write, |
1065 | .llseek = generic_file_llseek, | ||
1063 | }; | 1066 | }; |
1064 | 1067 | ||
1065 | #ifdef CONFIG_AUDITSYSCALL | 1068 | #ifdef CONFIG_AUDITSYSCALL |
@@ -1131,6 +1134,7 @@ out_free_page: | |||
1131 | static const struct file_operations proc_loginuid_operations = { | 1134 | static const struct file_operations proc_loginuid_operations = { |
1132 | .read = proc_loginuid_read, | 1135 | .read = proc_loginuid_read, |
1133 | .write = proc_loginuid_write, | 1136 | .write = proc_loginuid_write, |
1137 | .llseek = generic_file_llseek, | ||
1134 | }; | 1138 | }; |
1135 | 1139 | ||
1136 | static ssize_t proc_sessionid_read(struct file * file, char __user * buf, | 1140 | static ssize_t proc_sessionid_read(struct file * file, char __user * buf, |
@@ -1151,6 +1155,7 @@ static ssize_t proc_sessionid_read(struct file * file, char __user * buf, | |||
1151 | 1155 | ||
1152 | static const struct file_operations proc_sessionid_operations = { | 1156 | static const struct file_operations proc_sessionid_operations = { |
1153 | .read = proc_sessionid_read, | 1157 | .read = proc_sessionid_read, |
1158 | .llseek = generic_file_llseek, | ||
1154 | }; | 1159 | }; |
1155 | #endif | 1160 | #endif |
1156 | 1161 | ||
@@ -1202,6 +1207,7 @@ static ssize_t proc_fault_inject_write(struct file * file, | |||
1202 | static const struct file_operations proc_fault_inject_operations = { | 1207 | static const struct file_operations proc_fault_inject_operations = { |
1203 | .read = proc_fault_inject_read, | 1208 | .read = proc_fault_inject_read, |
1204 | .write = proc_fault_inject_write, | 1209 | .write = proc_fault_inject_write, |
1210 | .llseek = generic_file_llseek, | ||
1205 | }; | 1211 | }; |
1206 | #endif | 1212 | #endif |
1207 | 1213 | ||
@@ -1943,7 +1949,7 @@ static ssize_t proc_fdinfo_read(struct file *file, char __user *buf, | |||
1943 | } | 1949 | } |
1944 | 1950 | ||
1945 | static const struct file_operations proc_fdinfo_file_operations = { | 1951 | static const struct file_operations proc_fdinfo_file_operations = { |
1946 | .open = nonseekable_open, | 1952 | .open = nonseekable_open, |
1947 | .read = proc_fdinfo_read, | 1953 | .read = proc_fdinfo_read, |
1948 | }; | 1954 | }; |
1949 | 1955 | ||
@@ -2227,6 +2233,7 @@ out_no_task: | |||
2227 | static const struct file_operations proc_pid_attr_operations = { | 2233 | static const struct file_operations proc_pid_attr_operations = { |
2228 | .read = proc_pid_attr_read, | 2234 | .read = proc_pid_attr_read, |
2229 | .write = proc_pid_attr_write, | 2235 | .write = proc_pid_attr_write, |
2236 | .llseek = generic_file_llseek, | ||
2230 | }; | 2237 | }; |
2231 | 2238 | ||
2232 | static const struct pid_entry attr_dir_stuff[] = { | 2239 | static const struct pid_entry attr_dir_stuff[] = { |
@@ -2347,6 +2354,7 @@ static ssize_t proc_coredump_filter_write(struct file *file, | |||
2347 | static const struct file_operations proc_coredump_filter_operations = { | 2354 | static const struct file_operations proc_coredump_filter_operations = { |
2348 | .read = proc_coredump_filter_read, | 2355 | .read = proc_coredump_filter_read, |
2349 | .write = proc_coredump_filter_write, | 2356 | .write = proc_coredump_filter_write, |
2357 | .llseek = generic_file_llseek, | ||
2350 | }; | 2358 | }; |
2351 | #endif | 2359 | #endif |
2352 | 2360 | ||
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index d35b23238fb1..aea8502e58a3 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -232,9 +232,9 @@ static long proc_reg_unlocked_ioctl(struct file *file, unsigned int cmd, unsigne | |||
232 | if (rv == -ENOIOCTLCMD) | 232 | if (rv == -ENOIOCTLCMD) |
233 | rv = -EINVAL; | 233 | rv = -EINVAL; |
234 | } else if (ioctl) { | 234 | } else if (ioctl) { |
235 | lock_kernel(); | 235 | WARN_ONCE(1, "Procfs ioctl handlers must use unlocked_ioctl, " |
236 | "%pf will be called without the Bkl held\n", ioctl); | ||
236 | rv = ioctl(file->f_path.dentry->d_inode, file, cmd, arg); | 237 | rv = ioctl(file->f_path.dentry->d_inode, file, cmd, arg); |
237 | unlock_kernel(); | ||
238 | } | 238 | } |
239 | 239 | ||
240 | pde_users_dec(pde); | 240 | pde_users_dec(pde); |
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 19979a2ce272..c837a77351be 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c | |||
@@ -558,6 +558,7 @@ static int open_kcore(struct inode *inode, struct file *filp) | |||
558 | static const struct file_operations proc_kcore_operations = { | 558 | static const struct file_operations proc_kcore_operations = { |
559 | .read = read_kcore, | 559 | .read = read_kcore, |
560 | .open = open_kcore, | 560 | .open = open_kcore, |
561 | .llseek = generic_file_llseek, | ||
561 | }; | 562 | }; |
562 | 563 | ||
563 | #ifdef CONFIG_MEMORY_HOTPLUG | 564 | #ifdef CONFIG_MEMORY_HOTPLUG |
diff --git a/fs/proc/kmsg.c b/fs/proc/kmsg.c index cfe90a48a6e8..bd4b5a740ff1 100644 --- a/fs/proc/kmsg.c +++ b/fs/proc/kmsg.c | |||
@@ -53,6 +53,7 @@ static const struct file_operations proc_kmsg_operations = { | |||
53 | .poll = kmsg_poll, | 53 | .poll = kmsg_poll, |
54 | .open = kmsg_open, | 54 | .open = kmsg_open, |
55 | .release = kmsg_release, | 55 | .release = kmsg_release, |
56 | .llseek = generic_file_llseek, | ||
56 | }; | 57 | }; |
57 | 58 | ||
58 | static int __init proc_kmsg_init(void) | 59 | static int __init proc_kmsg_init(void) |
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index 9fbc99ec799a..91c817ff02c3 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c | |||
@@ -163,6 +163,7 @@ static ssize_t read_vmcore(struct file *file, char __user *buffer, | |||
163 | 163 | ||
164 | static const struct file_operations proc_vmcore_operations = { | 164 | static const struct file_operations proc_vmcore_operations = { |
165 | .read = read_vmcore, | 165 | .read = read_vmcore, |
166 | .llseek = generic_file_llseek, | ||
166 | }; | 167 | }; |
167 | 168 | ||
168 | static struct vmcore* __init get_new_element(void) | 169 | static struct vmcore* __init get_new_element(void) |