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 /fs/afs/proc.c | |
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>
Diffstat (limited to 'fs/afs/proc.c')
-rw-r--r-- | fs/afs/proc.c | 8 |
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); | |||
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, |