summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.ibm.com>2018-12-03 13:19:12 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-12-13 10:42:24 +0100
commit87ccdcfa9c706be835fea226eda0b1ae9c671413 (patch)
tree46f4a68e1886b9bc19003b0f3ebf34e474dc772b /drivers/s390
parentca92b93d17f8c546d10ae175430fb22d6bd2d60b (diff)
downloadlinux-87ccdcfa9c706be835fea226eda0b1ae9c671413.tar.bz2
s390/drivers: fix proc/debugfs file permissions
Remove write permissions for fops without a write callback. Signed-off-by: Sebastian Ott <sebott@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dasd_proc.c3
-rw-r--r--drivers/s390/char/tape_proc.c7
-rw-r--r--drivers/s390/cio/qdio_debug.c2
3 files changed, 4 insertions, 8 deletions
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c
index 5cb80c645489..1770b99f607e 100644
--- a/drivers/s390/block/dasd_proc.c
+++ b/drivers/s390/block/dasd_proc.c
@@ -339,8 +339,7 @@ dasd_proc_init(void)
dasd_proc_root_entry = proc_mkdir("dasd", NULL);
if (!dasd_proc_root_entry)
goto out_nodasd;
- dasd_devices_entry = proc_create_seq("devices",
- S_IFREG | S_IRUGO | S_IWUSR,
+ dasd_devices_entry = proc_create_seq("devices", 0444,
dasd_proc_root_entry,
&dasd_devices_seq_ops);
if (!dasd_devices_entry)
diff --git a/drivers/s390/char/tape_proc.c b/drivers/s390/char/tape_proc.c
index 32a14ee31c6b..2238d9df6c47 100644
--- a/drivers/s390/char/tape_proc.c
+++ b/drivers/s390/char/tape_proc.c
@@ -111,11 +111,8 @@ static const struct seq_operations tape_proc_seq = {
void
tape_proc_init(void)
{
- tape_proc_devices = proc_create_seq("tapedevices",
- S_IFREG | S_IRUGO | S_IWUSR, NULL, &tape_proc_seq);
- if (tape_proc_devices == NULL) {
- return;
- }
+ tape_proc_devices = proc_create_seq("tapedevices", 0444, NULL,
+ &tape_proc_seq);
}
/*
diff --git a/drivers/s390/cio/qdio_debug.c b/drivers/s390/cio/qdio_debug.c
index 040061f2bfff..d2f98e5829d4 100644
--- a/drivers/s390/cio/qdio_debug.c
+++ b/drivers/s390/cio/qdio_debug.c
@@ -293,7 +293,7 @@ static void setup_debugfs_entry(struct qdio_q *q)
snprintf(name, QDIO_DEBUGFS_NAME_LEN, "%s_%d",
q->is_input_q ? "input" : "output",
q->nr);
- q->debugfs_q = debugfs_create_file(name, S_IFREG | S_IRUGO | S_IWUSR,
+ q->debugfs_q = debugfs_create_file(name, 0444,
q->irq_ptr->debugfs_dev, q, &qstat_fops);
if (IS_ERR(q->debugfs_q))
q->debugfs_q = NULL;