aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
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 /drivers/scsi
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 'drivers/scsi')
-rw-r--r--drivers/scsi/sg.c6
1 files changed, 3 insertions, 3 deletions
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};
2236static struct seq_operations dev_seq_ops = { 2236static 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};
2249static struct seq_operations devstrs_seq_ops = { 2249static 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};
2262static struct seq_operations debug_seq_ops = { 2262static 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,