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/nfs | |
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/nfs')
-rw-r--r-- | fs/nfs/client.c | 4 |
1 files changed, 2 insertions, 2 deletions
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, |