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/dlm | |
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/dlm')
-rw-r--r-- | fs/dlm/debug_fs.c | 12 |
1 files changed, 6 insertions, 6 deletions
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, |