aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2009-09-22 19:43:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:29 -0400
commit88e9d34c727883d7d6f02cf1475b3ec98b8480c7 (patch)
tree475f544536d52739e0929e7727cab5124e855a06 /fs/afs
parentb7ed698cc9d556306a4088c238e2ea9311ea2cb3 (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>
Diffstat (limited to 'fs/afs')
-rw-r--r--fs/afs/proc.c8
1 files changed, 4 insertions, 4 deletions
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);
28static ssize_t afs_proc_cells_write(struct file *file, const char __user *buf, 28static 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
31static struct seq_operations afs_proc_cells_ops = { 31static 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,
70static void afs_proc_cell_volumes_stop(struct seq_file *p, void *v); 70static void afs_proc_cell_volumes_stop(struct seq_file *p, void *v);
71static int afs_proc_cell_volumes_show(struct seq_file *m, void *v); 71static int afs_proc_cell_volumes_show(struct seq_file *m, void *v);
72 72
73static struct seq_operations afs_proc_cell_volumes_ops = { 73static 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,
95static void afs_proc_cell_vlservers_stop(struct seq_file *p, void *v); 95static void afs_proc_cell_vlservers_stop(struct seq_file *p, void *v);
96static int afs_proc_cell_vlservers_show(struct seq_file *m, void *v); 96static int afs_proc_cell_vlservers_show(struct seq_file *m, void *v);
97 97
98static struct seq_operations afs_proc_cell_vlservers_ops = { 98static 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,
119static void afs_proc_cell_servers_stop(struct seq_file *p, void *v); 119static void afs_proc_cell_servers_stop(struct seq_file *p, void *v);
120static int afs_proc_cell_servers_show(struct seq_file *m, void *v); 120static int afs_proc_cell_servers_show(struct seq_file *m, void *v);
121 121
122static struct seq_operations afs_proc_cell_servers_ops = { 122static 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,