diff options
author | James Morris <jmorris@namei.org> | 2009-09-22 19:43:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 10:39:29 -0400 |
commit | 88e9d34c727883d7d6f02cf1475b3ec98b8480c7 (patch) | |
tree | 475f544536d52739e0929e7727cab5124e855a06 | |
parent | b7ed698cc9d556306a4088c238e2ea9311ea2cb3 (diff) |
seq_file: constify seq_operations
Make all seq_operations structs const, to help mitigate against
revectoring user-triggerable function pointers.
This is derived from the grsecurity patch, although generated from scratch
because it's simpler than extracting the changes from there.
Signed-off-by: James Morris <jmorris@namei.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/mn10300/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/hvCall_inst.c | 2 | ||||
-rw-r--r-- | drivers/block/cciss.c | 2 | ||||
-rw-r--r-- | drivers/char/misc.c | 2 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_bios.c | 4 | ||||
-rw-r--r-- | drivers/isdn/capi/kcapi_proc.c | 10 | ||||
-rw-r--r-- | drivers/scsi/sg.c | 6 | ||||
-rw-r--r-- | fs/afs/proc.c | 8 | ||||
-rw-r--r-- | fs/dlm/debug_fs.c | 12 | ||||
-rw-r--r-- | fs/jbd2/journal.c | 4 | ||||
-rw-r--r-- | fs/nfs/client.c | 4 | ||||
-rw-r--r-- | fs/nfsd/export.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/cluster/netdebug.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmdebug.c | 2 | ||||
-rw-r--r-- | fs/proc/nommu.c | 2 | ||||
-rw-r--r-- | include/linux/nfsd/nfsd.h | 2 | ||||
-rw-r--r-- | ipc/util.c | 2 | ||||
-rw-r--r-- | kernel/cgroup.c | 2 | ||||
-rw-r--r-- | kernel/kprobes.c | 2 | ||||
-rw-r--r-- | kernel/lockdep_proc.c | 2 | ||||
-rw-r--r-- | kernel/trace/ftrace.c | 4 | ||||
-rw-r--r-- | kernel/trace/trace.c | 4 | ||||
-rw-r--r-- | net/ipv6/ip6mr.c | 2 | ||||
-rw-r--r-- | security/integrity/ima/ima_fs.c | 4 | ||||
-rw-r--r-- | security/smack/smackfs.c | 6 |
26 files changed, 49 insertions, 49 deletions
diff --git a/arch/mn10300/kernel/setup.c b/arch/mn10300/kernel/setup.c index 79890edfd67a..3f24c298a3af 100644 --- a/arch/mn10300/kernel/setup.c +++ b/arch/mn10300/kernel/setup.c | |||
@@ -285,7 +285,7 @@ static void c_stop(struct seq_file *m, void *v) | |||
285 | { | 285 | { |
286 | } | 286 | } |
287 | 287 | ||
288 | struct seq_operations cpuinfo_op = { | 288 | const struct seq_operations cpuinfo_op = { |
289 | .start = c_start, | 289 | .start = c_start, |
290 | .next = c_next, | 290 | .next = c_next, |
291 | .stop = c_stop, | 291 | .stop = c_stop, |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 02fed27af7f6..1d5570a1e456 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -328,7 +328,7 @@ static void c_stop(struct seq_file *m, void *v) | |||
328 | { | 328 | { |
329 | } | 329 | } |
330 | 330 | ||
331 | struct seq_operations cpuinfo_op = { | 331 | const struct seq_operations cpuinfo_op = { |
332 | .start =c_start, | 332 | .start =c_start, |
333 | .next = c_next, | 333 | .next = c_next, |
334 | .stop = c_stop, | 334 | .stop = c_stop, |
diff --git a/arch/powerpc/platforms/pseries/hvCall_inst.c b/arch/powerpc/platforms/pseries/hvCall_inst.c index eae51ef9af24..3631a4f277eb 100644 --- a/arch/powerpc/platforms/pseries/hvCall_inst.c +++ b/arch/powerpc/platforms/pseries/hvCall_inst.c | |||
@@ -71,7 +71,7 @@ static int hc_show(struct seq_file *m, void *p) | |||
71 | return 0; | 71 | return 0; |
72 | } | 72 | } |
73 | 73 | ||
74 | static struct seq_operations hcall_inst_seq_ops = { | 74 | static const struct seq_operations hcall_inst_seq_ops = { |
75 | .start = hc_start, | 75 | .start = hc_start, |
76 | .next = hc_next, | 76 | .next = hc_next, |
77 | .stop = hc_stop, | 77 | .stop = hc_stop, |
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 4f19105f755c..24c3e21ab263 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -363,7 +363,7 @@ static void cciss_seq_stop(struct seq_file *seq, void *v) | |||
363 | h->busy_configuring = 0; | 363 | h->busy_configuring = 0; |
364 | } | 364 | } |
365 | 365 | ||
366 | static struct seq_operations cciss_seq_ops = { | 366 | static const struct seq_operations cciss_seq_ops = { |
367 | .start = cciss_seq_start, | 367 | .start = cciss_seq_start, |
368 | .show = cciss_seq_show, | 368 | .show = cciss_seq_show, |
369 | .next = cciss_seq_next, | 369 | .next = cciss_seq_next, |
diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 1ee27cc23426..07fa612a58d5 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c | |||
@@ -91,7 +91,7 @@ static int misc_seq_show(struct seq_file *seq, void *v) | |||
91 | } | 91 | } |
92 | 92 | ||
93 | 93 | ||
94 | static struct seq_operations misc_seq_ops = { | 94 | static const struct seq_operations misc_seq_ops = { |
95 | .start = misc_seq_start, | 95 | .start = misc_seq_start, |
96 | .next = misc_seq_next, | 96 | .next = misc_seq_next, |
97 | .stop = misc_seq_stop, | 97 | .stop = misc_seq_stop, |
diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c index 0c2f55a38b95..bf2170fb1cdd 100644 --- a/drivers/char/tpm/tpm_bios.c +++ b/drivers/char/tpm/tpm_bios.c | |||
@@ -343,14 +343,14 @@ static int tpm_ascii_bios_measurements_show(struct seq_file *m, void *v) | |||
343 | return 0; | 343 | return 0; |
344 | } | 344 | } |
345 | 345 | ||
346 | static struct seq_operations tpm_ascii_b_measurments_seqops = { | 346 | static const struct seq_operations tpm_ascii_b_measurments_seqops = { |
347 | .start = tpm_bios_measurements_start, | 347 | .start = tpm_bios_measurements_start, |
348 | .next = tpm_bios_measurements_next, | 348 | .next = tpm_bios_measurements_next, |
349 | .stop = tpm_bios_measurements_stop, | 349 | .stop = tpm_bios_measurements_stop, |
350 | .show = tpm_ascii_bios_measurements_show, | 350 | .show = tpm_ascii_bios_measurements_show, |
351 | }; | 351 | }; |
352 | 352 | ||
353 | static struct seq_operations tpm_binary_b_measurments_seqops = { | 353 | static const struct seq_operations tpm_binary_b_measurments_seqops = { |
354 | .start = tpm_bios_measurements_start, | 354 | .start = tpm_bios_measurements_start, |
355 | .next = tpm_bios_measurements_next, | 355 | .next = tpm_bios_measurements_next, |
356 | .stop = tpm_bios_measurements_stop, | 356 | .stop = tpm_bios_measurements_stop, |
diff --git a/drivers/isdn/capi/kcapi_proc.c b/drivers/isdn/capi/kcapi_proc.c index 50ed778f63fc..09d4db764d22 100644 --- a/drivers/isdn/capi/kcapi_proc.c +++ b/drivers/isdn/capi/kcapi_proc.c | |||
@@ -89,14 +89,14 @@ static int contrstats_show(struct seq_file *seq, void *v) | |||
89 | return 0; | 89 | return 0; |
90 | } | 90 | } |
91 | 91 | ||
92 | static struct seq_operations seq_controller_ops = { | 92 | static const struct seq_operations seq_controller_ops = { |
93 | .start = controller_start, | 93 | .start = controller_start, |
94 | .next = controller_next, | 94 | .next = controller_next, |
95 | .stop = controller_stop, | 95 | .stop = controller_stop, |
96 | .show = controller_show, | 96 | .show = controller_show, |
97 | }; | 97 | }; |
98 | 98 | ||
99 | static struct seq_operations seq_contrstats_ops = { | 99 | static const struct seq_operations seq_contrstats_ops = { |
100 | .start = controller_start, | 100 | .start = controller_start, |
101 | .next = controller_next, | 101 | .next = controller_next, |
102 | .stop = controller_stop, | 102 | .stop = controller_stop, |
@@ -194,14 +194,14 @@ applstats_show(struct seq_file *seq, void *v) | |||
194 | return 0; | 194 | return 0; |
195 | } | 195 | } |
196 | 196 | ||
197 | static struct seq_operations seq_applications_ops = { | 197 | static const struct seq_operations seq_applications_ops = { |
198 | .start = applications_start, | 198 | .start = applications_start, |
199 | .next = applications_next, | 199 | .next = applications_next, |
200 | .stop = applications_stop, | 200 | .stop = applications_stop, |
201 | .show = applications_show, | 201 | .show = applications_show, |
202 | }; | 202 | }; |
203 | 203 | ||
204 | static struct seq_operations seq_applstats_ops = { | 204 | static const struct seq_operations seq_applstats_ops = { |
205 | .start = applications_start, | 205 | .start = applications_start, |
206 | .next = applications_next, | 206 | .next = applications_next, |
207 | .stop = applications_stop, | 207 | .stop = applications_stop, |
@@ -264,7 +264,7 @@ static int capi_driver_show(struct seq_file *seq, void *v) | |||
264 | return 0; | 264 | return 0; |
265 | } | 265 | } |
266 | 266 | ||
267 | static struct seq_operations seq_capi_driver_ops = { | 267 | static const struct seq_operations seq_capi_driver_ops = { |
268 | .start = capi_driver_start, | 268 | .start = capi_driver_start, |
269 | .next = capi_driver_next, | 269 | .next = capi_driver_next, |
270 | .stop = capi_driver_stop, | 270 | .stop = capi_driver_stop, |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 4968c4ced385..848b59466850 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -2233,7 +2233,7 @@ static struct file_operations dev_fops = { | |||
2233 | .open = sg_proc_open_dev, | 2233 | .open = sg_proc_open_dev, |
2234 | .release = seq_release, | 2234 | .release = seq_release, |
2235 | }; | 2235 | }; |
2236 | static struct seq_operations dev_seq_ops = { | 2236 | static const struct seq_operations dev_seq_ops = { |
2237 | .start = dev_seq_start, | 2237 | .start = dev_seq_start, |
2238 | .next = dev_seq_next, | 2238 | .next = dev_seq_next, |
2239 | .stop = dev_seq_stop, | 2239 | .stop = dev_seq_stop, |
@@ -2246,7 +2246,7 @@ static struct file_operations devstrs_fops = { | |||
2246 | .open = sg_proc_open_devstrs, | 2246 | .open = sg_proc_open_devstrs, |
2247 | .release = seq_release, | 2247 | .release = seq_release, |
2248 | }; | 2248 | }; |
2249 | static struct seq_operations devstrs_seq_ops = { | 2249 | static const struct seq_operations devstrs_seq_ops = { |
2250 | .start = dev_seq_start, | 2250 | .start = dev_seq_start, |
2251 | .next = dev_seq_next, | 2251 | .next = dev_seq_next, |
2252 | .stop = dev_seq_stop, | 2252 | .stop = dev_seq_stop, |
@@ -2259,7 +2259,7 @@ static struct file_operations debug_fops = { | |||
2259 | .open = sg_proc_open_debug, | 2259 | .open = sg_proc_open_debug, |
2260 | .release = seq_release, | 2260 | .release = seq_release, |
2261 | }; | 2261 | }; |
2262 | static struct seq_operations debug_seq_ops = { | 2262 | static const struct seq_operations debug_seq_ops = { |
2263 | .start = dev_seq_start, | 2263 | .start = dev_seq_start, |
2264 | .next = dev_seq_next, | 2264 | .next = dev_seq_next, |
2265 | .stop = dev_seq_stop, | 2265 | .stop = dev_seq_stop, |
diff --git a/fs/afs/proc.c b/fs/afs/proc.c index 8630615e57fe..852739d262a9 100644 --- a/fs/afs/proc.c +++ b/fs/afs/proc.c | |||
@@ -28,7 +28,7 @@ static int afs_proc_cells_show(struct seq_file *m, void *v); | |||
28 | static ssize_t afs_proc_cells_write(struct file *file, const char __user *buf, | 28 | static ssize_t afs_proc_cells_write(struct file *file, const char __user *buf, |
29 | size_t size, loff_t *_pos); | 29 | size_t size, loff_t *_pos); |
30 | 30 | ||
31 | static struct seq_operations afs_proc_cells_ops = { | 31 | static const struct seq_operations afs_proc_cells_ops = { |
32 | .start = afs_proc_cells_start, | 32 | .start = afs_proc_cells_start, |
33 | .next = afs_proc_cells_next, | 33 | .next = afs_proc_cells_next, |
34 | .stop = afs_proc_cells_stop, | 34 | .stop = afs_proc_cells_stop, |
@@ -70,7 +70,7 @@ static void *afs_proc_cell_volumes_next(struct seq_file *p, void *v, | |||
70 | static void afs_proc_cell_volumes_stop(struct seq_file *p, void *v); | 70 | static void afs_proc_cell_volumes_stop(struct seq_file *p, void *v); |
71 | static int afs_proc_cell_volumes_show(struct seq_file *m, void *v); | 71 | static int afs_proc_cell_volumes_show(struct seq_file *m, void *v); |
72 | 72 | ||
73 | static struct seq_operations afs_proc_cell_volumes_ops = { | 73 | static const struct seq_operations afs_proc_cell_volumes_ops = { |
74 | .start = afs_proc_cell_volumes_start, | 74 | .start = afs_proc_cell_volumes_start, |
75 | .next = afs_proc_cell_volumes_next, | 75 | .next = afs_proc_cell_volumes_next, |
76 | .stop = afs_proc_cell_volumes_stop, | 76 | .stop = afs_proc_cell_volumes_stop, |
@@ -95,7 +95,7 @@ static void *afs_proc_cell_vlservers_next(struct seq_file *p, void *v, | |||
95 | static void afs_proc_cell_vlservers_stop(struct seq_file *p, void *v); | 95 | static void afs_proc_cell_vlservers_stop(struct seq_file *p, void *v); |
96 | static int afs_proc_cell_vlservers_show(struct seq_file *m, void *v); | 96 | static int afs_proc_cell_vlservers_show(struct seq_file *m, void *v); |
97 | 97 | ||
98 | static struct seq_operations afs_proc_cell_vlservers_ops = { | 98 | static const struct seq_operations afs_proc_cell_vlservers_ops = { |
99 | .start = afs_proc_cell_vlservers_start, | 99 | .start = afs_proc_cell_vlservers_start, |
100 | .next = afs_proc_cell_vlservers_next, | 100 | .next = afs_proc_cell_vlservers_next, |
101 | .stop = afs_proc_cell_vlservers_stop, | 101 | .stop = afs_proc_cell_vlservers_stop, |
@@ -119,7 +119,7 @@ static void *afs_proc_cell_servers_next(struct seq_file *p, void *v, | |||
119 | static void afs_proc_cell_servers_stop(struct seq_file *p, void *v); | 119 | static void afs_proc_cell_servers_stop(struct seq_file *p, void *v); |
120 | static int afs_proc_cell_servers_show(struct seq_file *m, void *v); | 120 | static int afs_proc_cell_servers_show(struct seq_file *m, void *v); |
121 | 121 | ||
122 | static struct seq_operations afs_proc_cell_servers_ops = { | 122 | static const struct seq_operations afs_proc_cell_servers_ops = { |
123 | .start = afs_proc_cell_servers_start, | 123 | .start = afs_proc_cell_servers_start, |
124 | .next = afs_proc_cell_servers_next, | 124 | .next = afs_proc_cell_servers_next, |
125 | .stop = afs_proc_cell_servers_stop, | 125 | .stop = afs_proc_cell_servers_stop, |
diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c index 1d1d27442235..1c8bb8c3a82e 100644 --- a/fs/dlm/debug_fs.c +++ b/fs/dlm/debug_fs.c | |||
@@ -386,9 +386,9 @@ static int table_seq_show(struct seq_file *seq, void *iter_ptr) | |||
386 | return rv; | 386 | return rv; |
387 | } | 387 | } |
388 | 388 | ||
389 | static struct seq_operations format1_seq_ops; | 389 | static const struct seq_operations format1_seq_ops; |
390 | static struct seq_operations format2_seq_ops; | 390 | static const struct seq_operations format2_seq_ops; |
391 | static struct seq_operations format3_seq_ops; | 391 | static const struct seq_operations format3_seq_ops; |
392 | 392 | ||
393 | static void *table_seq_start(struct seq_file *seq, loff_t *pos) | 393 | static void *table_seq_start(struct seq_file *seq, loff_t *pos) |
394 | { | 394 | { |
@@ -534,21 +534,21 @@ static void table_seq_stop(struct seq_file *seq, void *iter_ptr) | |||
534 | } | 534 | } |
535 | } | 535 | } |
536 | 536 | ||
537 | static struct seq_operations format1_seq_ops = { | 537 | static const struct seq_operations format1_seq_ops = { |
538 | .start = table_seq_start, | 538 | .start = table_seq_start, |
539 | .next = table_seq_next, | 539 | .next = table_seq_next, |
540 | .stop = table_seq_stop, | 540 | .stop = table_seq_stop, |
541 | .show = table_seq_show, | 541 | .show = table_seq_show, |
542 | }; | 542 | }; |
543 | 543 | ||
544 | static struct seq_operations format2_seq_ops = { | 544 | static const struct seq_operations format2_seq_ops = { |
545 | .start = table_seq_start, | 545 | .start = table_seq_start, |
546 | .next = table_seq_next, | 546 | .next = table_seq_next, |
547 | .stop = table_seq_stop, | 547 | .stop = table_seq_stop, |
548 | .show = table_seq_show, | 548 | .show = table_seq_show, |
549 | }; | 549 | }; |
550 | 550 | ||
551 | static struct seq_operations format3_seq_ops = { | 551 | static const struct seq_operations format3_seq_ops = { |
552 | .start = table_seq_start, | 552 | .start = table_seq_start, |
553 | .next = table_seq_next, | 553 | .next = table_seq_next, |
554 | .stop = table_seq_stop, | 554 | .stop = table_seq_stop, |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index a8a358bc0f21..53b86e16e5fe 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
@@ -768,7 +768,7 @@ static void jbd2_seq_history_stop(struct seq_file *seq, void *v) | |||
768 | { | 768 | { |
769 | } | 769 | } |
770 | 770 | ||
771 | static struct seq_operations jbd2_seq_history_ops = { | 771 | static const struct seq_operations jbd2_seq_history_ops = { |
772 | .start = jbd2_seq_history_start, | 772 | .start = jbd2_seq_history_start, |
773 | .next = jbd2_seq_history_next, | 773 | .next = jbd2_seq_history_next, |
774 | .stop = jbd2_seq_history_stop, | 774 | .stop = jbd2_seq_history_stop, |
@@ -872,7 +872,7 @@ static void jbd2_seq_info_stop(struct seq_file *seq, void *v) | |||
872 | { | 872 | { |
873 | } | 873 | } |
874 | 874 | ||
875 | static struct seq_operations jbd2_seq_info_ops = { | 875 | static const struct seq_operations jbd2_seq_info_ops = { |
876 | .start = jbd2_seq_info_start, | 876 | .start = jbd2_seq_info_start, |
877 | .next = jbd2_seq_info_next, | 877 | .next = jbd2_seq_info_next, |
878 | .stop = jbd2_seq_info_stop, | 878 | .stop = jbd2_seq_info_stop, |
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index a7ce15d3c248..152025358dad 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -1531,7 +1531,7 @@ static void *nfs_server_list_next(struct seq_file *p, void *v, loff_t *pos); | |||
1531 | static void nfs_server_list_stop(struct seq_file *p, void *v); | 1531 | static void nfs_server_list_stop(struct seq_file *p, void *v); |
1532 | static int nfs_server_list_show(struct seq_file *m, void *v); | 1532 | static int nfs_server_list_show(struct seq_file *m, void *v); |
1533 | 1533 | ||
1534 | static struct seq_operations nfs_server_list_ops = { | 1534 | static const struct seq_operations nfs_server_list_ops = { |
1535 | .start = nfs_server_list_start, | 1535 | .start = nfs_server_list_start, |
1536 | .next = nfs_server_list_next, | 1536 | .next = nfs_server_list_next, |
1537 | .stop = nfs_server_list_stop, | 1537 | .stop = nfs_server_list_stop, |
@@ -1552,7 +1552,7 @@ static void *nfs_volume_list_next(struct seq_file *p, void *v, loff_t *pos); | |||
1552 | static void nfs_volume_list_stop(struct seq_file *p, void *v); | 1552 | static void nfs_volume_list_stop(struct seq_file *p, void *v); |
1553 | static int nfs_volume_list_show(struct seq_file *m, void *v); | 1553 | static int nfs_volume_list_show(struct seq_file *m, void *v); |
1554 | 1554 | ||
1555 | static struct seq_operations nfs_volume_list_ops = { | 1555 | static const struct seq_operations nfs_volume_list_ops = { |
1556 | .start = nfs_volume_list_start, | 1556 | .start = nfs_volume_list_start, |
1557 | .next = nfs_volume_list_next, | 1557 | .next = nfs_volume_list_next, |
1558 | .stop = nfs_volume_list_stop, | 1558 | .stop = nfs_volume_list_stop, |
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 984a5ebcc1d6..c1c9e035d4a4 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -1517,7 +1517,7 @@ static int e_show(struct seq_file *m, void *p) | |||
1517 | return svc_export_show(m, &svc_export_cache, cp); | 1517 | return svc_export_show(m, &svc_export_cache, cp); |
1518 | } | 1518 | } |
1519 | 1519 | ||
1520 | struct seq_operations nfs_exports_op = { | 1520 | const struct seq_operations nfs_exports_op = { |
1521 | .start = e_start, | 1521 | .start = e_start, |
1522 | .next = e_next, | 1522 | .next = e_next, |
1523 | .stop = e_stop, | 1523 | .stop = e_stop, |
diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c index f8424874fa07..cfb2be708abe 100644 --- a/fs/ocfs2/cluster/netdebug.c +++ b/fs/ocfs2/cluster/netdebug.c | |||
@@ -163,7 +163,7 @@ static void nst_seq_stop(struct seq_file *seq, void *v) | |||
163 | { | 163 | { |
164 | } | 164 | } |
165 | 165 | ||
166 | static struct seq_operations nst_seq_ops = { | 166 | static const struct seq_operations nst_seq_ops = { |
167 | .start = nst_seq_start, | 167 | .start = nst_seq_start, |
168 | .next = nst_seq_next, | 168 | .next = nst_seq_next, |
169 | .stop = nst_seq_stop, | 169 | .stop = nst_seq_stop, |
@@ -344,7 +344,7 @@ static void sc_seq_stop(struct seq_file *seq, void *v) | |||
344 | { | 344 | { |
345 | } | 345 | } |
346 | 346 | ||
347 | static struct seq_operations sc_seq_ops = { | 347 | static const struct seq_operations sc_seq_ops = { |
348 | .start = sc_seq_start, | 348 | .start = sc_seq_start, |
349 | .next = sc_seq_next, | 349 | .next = sc_seq_next, |
350 | .stop = sc_seq_stop, | 350 | .stop = sc_seq_stop, |
diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c index df52f706f669..c5c88124096d 100644 --- a/fs/ocfs2/dlm/dlmdebug.c +++ b/fs/ocfs2/dlm/dlmdebug.c | |||
@@ -683,7 +683,7 @@ static int lockres_seq_show(struct seq_file *s, void *v) | |||
683 | return 0; | 683 | return 0; |
684 | } | 684 | } |
685 | 685 | ||
686 | static struct seq_operations debug_lockres_ops = { | 686 | static const struct seq_operations debug_lockres_ops = { |
687 | .start = lockres_seq_start, | 687 | .start = lockres_seq_start, |
688 | .stop = lockres_seq_stop, | 688 | .stop = lockres_seq_stop, |
689 | .next = lockres_seq_next, | 689 | .next = lockres_seq_next, |
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c index 7e14d1a04001..9fe7d7ebe115 100644 --- a/fs/proc/nommu.c +++ b/fs/proc/nommu.c | |||
@@ -109,7 +109,7 @@ static void *nommu_region_list_next(struct seq_file *m, void *v, loff_t *pos) | |||
109 | return rb_next((struct rb_node *) v); | 109 | return rb_next((struct rb_node *) v); |
110 | } | 110 | } |
111 | 111 | ||
112 | static struct seq_operations proc_nommu_region_list_seqop = { | 112 | static const struct seq_operations proc_nommu_region_list_seqop = { |
113 | .start = nommu_region_list_start, | 113 | .start = nommu_region_list_start, |
114 | .next = nommu_region_list_next, | 114 | .next = nommu_region_list_next, |
115 | .stop = nommu_region_list_stop, | 115 | .stop = nommu_region_list_stop, |
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index 03bbe9039104..510ffdd5020e 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -60,7 +60,7 @@ extern spinlock_t nfsd_drc_lock; | |||
60 | extern unsigned int nfsd_drc_max_mem; | 60 | extern unsigned int nfsd_drc_max_mem; |
61 | extern unsigned int nfsd_drc_mem_used; | 61 | extern unsigned int nfsd_drc_mem_used; |
62 | 62 | ||
63 | extern struct seq_operations nfs_exports_op; | 63 | extern const struct seq_operations nfs_exports_op; |
64 | 64 | ||
65 | /* | 65 | /* |
66 | * Function prototypes. | 66 | * Function prototypes. |
diff --git a/ipc/util.c b/ipc/util.c index b8e4ba92f6d1..79ce84e890f7 100644 --- a/ipc/util.c +++ b/ipc/util.c | |||
@@ -942,7 +942,7 @@ static int sysvipc_proc_show(struct seq_file *s, void *it) | |||
942 | return iface->show(s, it); | 942 | return iface->show(s, it); |
943 | } | 943 | } |
944 | 944 | ||
945 | static struct seq_operations sysvipc_proc_seqops = { | 945 | static const struct seq_operations sysvipc_proc_seqops = { |
946 | .start = sysvipc_proc_start, | 946 | .start = sysvipc_proc_start, |
947 | .stop = sysvipc_proc_stop, | 947 | .stop = sysvipc_proc_stop, |
948 | .next = sysvipc_proc_next, | 948 | .next = sysvipc_proc_next, |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 213b7f92fcdd..cd83d9933b6b 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -2314,7 +2314,7 @@ static int cgroup_tasks_show(struct seq_file *s, void *v) | |||
2314 | return seq_printf(s, "%d\n", *(int *)v); | 2314 | return seq_printf(s, "%d\n", *(int *)v); |
2315 | } | 2315 | } |
2316 | 2316 | ||
2317 | static struct seq_operations cgroup_tasks_seq_operations = { | 2317 | static const struct seq_operations cgroup_tasks_seq_operations = { |
2318 | .start = cgroup_tasks_start, | 2318 | .start = cgroup_tasks_start, |
2319 | .stop = cgroup_tasks_stop, | 2319 | .stop = cgroup_tasks_stop, |
2320 | .next = cgroup_tasks_next, | 2320 | .next = cgroup_tasks_next, |
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index ef177d653b2c..cfadc1291d0b 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -1321,7 +1321,7 @@ static int __kprobes show_kprobe_addr(struct seq_file *pi, void *v) | |||
1321 | return 0; | 1321 | return 0; |
1322 | } | 1322 | } |
1323 | 1323 | ||
1324 | static struct seq_operations kprobes_seq_ops = { | 1324 | static const struct seq_operations kprobes_seq_ops = { |
1325 | .start = kprobe_seq_start, | 1325 | .start = kprobe_seq_start, |
1326 | .next = kprobe_seq_next, | 1326 | .next = kprobe_seq_next, |
1327 | .stop = kprobe_seq_stop, | 1327 | .stop = kprobe_seq_stop, |
diff --git a/kernel/lockdep_proc.c b/kernel/lockdep_proc.c index d4b3dbc79fdb..d4aba4f3584c 100644 --- a/kernel/lockdep_proc.c +++ b/kernel/lockdep_proc.c | |||
@@ -594,7 +594,7 @@ static int ls_show(struct seq_file *m, void *v) | |||
594 | return 0; | 594 | return 0; |
595 | } | 595 | } |
596 | 596 | ||
597 | static struct seq_operations lockstat_ops = { | 597 | static const struct seq_operations lockstat_ops = { |
598 | .start = ls_start, | 598 | .start = ls_start, |
599 | .next = ls_next, | 599 | .next = ls_next, |
600 | .stop = ls_stop, | 600 | .stop = ls_stop, |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index c71e91bf7372..23df7771c937 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -1520,7 +1520,7 @@ static int t_show(struct seq_file *m, void *v) | |||
1520 | return 0; | 1520 | return 0; |
1521 | } | 1521 | } |
1522 | 1522 | ||
1523 | static struct seq_operations show_ftrace_seq_ops = { | 1523 | static const struct seq_operations show_ftrace_seq_ops = { |
1524 | .start = t_start, | 1524 | .start = t_start, |
1525 | .next = t_next, | 1525 | .next = t_next, |
1526 | .stop = t_stop, | 1526 | .stop = t_stop, |
@@ -2459,7 +2459,7 @@ static int g_show(struct seq_file *m, void *v) | |||
2459 | return 0; | 2459 | return 0; |
2460 | } | 2460 | } |
2461 | 2461 | ||
2462 | static struct seq_operations ftrace_graph_seq_ops = { | 2462 | static const struct seq_operations ftrace_graph_seq_ops = { |
2463 | .start = g_start, | 2463 | .start = g_start, |
2464 | .next = g_next, | 2464 | .next = g_next, |
2465 | .stop = g_stop, | 2465 | .stop = g_stop, |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index a35925d222ba..6c0f6a8a22eb 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -1949,7 +1949,7 @@ static int s_show(struct seq_file *m, void *v) | |||
1949 | return 0; | 1949 | return 0; |
1950 | } | 1950 | } |
1951 | 1951 | ||
1952 | static struct seq_operations tracer_seq_ops = { | 1952 | static const struct seq_operations tracer_seq_ops = { |
1953 | .start = s_start, | 1953 | .start = s_start, |
1954 | .next = s_next, | 1954 | .next = s_next, |
1955 | .stop = s_stop, | 1955 | .stop = s_stop, |
@@ -2163,7 +2163,7 @@ static int t_show(struct seq_file *m, void *v) | |||
2163 | return 0; | 2163 | return 0; |
2164 | } | 2164 | } |
2165 | 2165 | ||
2166 | static struct seq_operations show_traces_seq_ops = { | 2166 | static const struct seq_operations show_traces_seq_ops = { |
2167 | .start = t_start, | 2167 | .start = t_start, |
2168 | .next = t_next, | 2168 | .next = t_next, |
2169 | .stop = t_stop, | 2169 | .stop = t_stop, |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 3907510c2ce3..090675e269ee 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -324,7 +324,7 @@ static int ipmr_mfc_seq_show(struct seq_file *seq, void *v) | |||
324 | return 0; | 324 | return 0; |
325 | } | 325 | } |
326 | 326 | ||
327 | static struct seq_operations ipmr_mfc_seq_ops = { | 327 | static const struct seq_operations ipmr_mfc_seq_ops = { |
328 | .start = ipmr_mfc_seq_start, | 328 | .start = ipmr_mfc_seq_start, |
329 | .next = ipmr_mfc_seq_next, | 329 | .next = ipmr_mfc_seq_next, |
330 | .stop = ipmr_mfc_seq_stop, | 330 | .stop = ipmr_mfc_seq_stop, |
diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c index 6bfc7eaebfda..8e9777b76405 100644 --- a/security/integrity/ima/ima_fs.c +++ b/security/integrity/ima/ima_fs.c | |||
@@ -146,7 +146,7 @@ static int ima_measurements_show(struct seq_file *m, void *v) | |||
146 | return 0; | 146 | return 0; |
147 | } | 147 | } |
148 | 148 | ||
149 | static struct seq_operations ima_measurments_seqops = { | 149 | static const struct seq_operations ima_measurments_seqops = { |
150 | .start = ima_measurements_start, | 150 | .start = ima_measurements_start, |
151 | .next = ima_measurements_next, | 151 | .next = ima_measurements_next, |
152 | .stop = ima_measurements_stop, | 152 | .stop = ima_measurements_stop, |
@@ -221,7 +221,7 @@ static int ima_ascii_measurements_show(struct seq_file *m, void *v) | |||
221 | return 0; | 221 | return 0; |
222 | } | 222 | } |
223 | 223 | ||
224 | static struct seq_operations ima_ascii_measurements_seqops = { | 224 | static const struct seq_operations ima_ascii_measurements_seqops = { |
225 | .start = ima_measurements_start, | 225 | .start = ima_measurements_start, |
226 | .next = ima_measurements_next, | 226 | .next = ima_measurements_next, |
227 | .stop = ima_measurements_stop, | 227 | .stop = ima_measurements_stop, |
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index f83a80980726..aeead7585093 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c | |||
@@ -187,7 +187,7 @@ static void load_seq_stop(struct seq_file *s, void *v) | |||
187 | /* No-op */ | 187 | /* No-op */ |
188 | } | 188 | } |
189 | 189 | ||
190 | static struct seq_operations load_seq_ops = { | 190 | static const struct seq_operations load_seq_ops = { |
191 | .start = load_seq_start, | 191 | .start = load_seq_start, |
192 | .next = load_seq_next, | 192 | .next = load_seq_next, |
193 | .show = load_seq_show, | 193 | .show = load_seq_show, |
@@ -503,7 +503,7 @@ static void cipso_seq_stop(struct seq_file *s, void *v) | |||
503 | /* No-op */ | 503 | /* No-op */ |
504 | } | 504 | } |
505 | 505 | ||
506 | static struct seq_operations cipso_seq_ops = { | 506 | static const struct seq_operations cipso_seq_ops = { |
507 | .start = cipso_seq_start, | 507 | .start = cipso_seq_start, |
508 | .stop = cipso_seq_stop, | 508 | .stop = cipso_seq_stop, |
509 | .next = cipso_seq_next, | 509 | .next = cipso_seq_next, |
@@ -697,7 +697,7 @@ static void netlbladdr_seq_stop(struct seq_file *s, void *v) | |||
697 | /* No-op */ | 697 | /* No-op */ |
698 | } | 698 | } |
699 | 699 | ||
700 | static struct seq_operations netlbladdr_seq_ops = { | 700 | static const struct seq_operations netlbladdr_seq_ops = { |
701 | .start = netlbladdr_seq_start, | 701 | .start = netlbladdr_seq_start, |
702 | .stop = netlbladdr_seq_stop, | 702 | .stop = netlbladdr_seq_stop, |
703 | .next = netlbladdr_seq_next, | 703 | .next = netlbladdr_seq_next, |