Skip to content

Commit 87ccdcf

Browse files
sebottMartin Schwidefsky
authored andcommitted
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>
1 parent ca92b93 commit 87ccdcf

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

drivers/s390/block/dasd_proc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,7 @@ dasd_proc_init(void)
339339
dasd_proc_root_entry = proc_mkdir("dasd", NULL);
340340
if (!dasd_proc_root_entry)
341341
goto out_nodasd;
342-
dasd_devices_entry = proc_create_seq("devices",
343-
S_IFREG | S_IRUGO | S_IWUSR,
342+
dasd_devices_entry = proc_create_seq("devices", 0444,
344343
dasd_proc_root_entry,
345344
&dasd_devices_seq_ops);
346345
if (!dasd_devices_entry)

drivers/s390/char/tape_proc.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,8 @@ static const struct seq_operations tape_proc_seq = {
111111
void
112112
tape_proc_init(void)
113113
{
114-
tape_proc_devices = proc_create_seq("tapedevices",
115-
S_IFREG | S_IRUGO | S_IWUSR, NULL, &tape_proc_seq);
116-
if (tape_proc_devices == NULL) {
117-
return;
118-
}
114+
tape_proc_devices = proc_create_seq("tapedevices", 0444, NULL,
115+
&tape_proc_seq);
119116
}
120117

121118
/*

drivers/s390/cio/qdio_debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ static void setup_debugfs_entry(struct qdio_q *q)
293293
snprintf(name, QDIO_DEBUGFS_NAME_LEN, "%s_%d",
294294
q->is_input_q ? "input" : "output",
295295
q->nr);
296-
q->debugfs_q = debugfs_create_file(name, S_IFREG | S_IRUGO | S_IWUSR,
296+
q->debugfs_q = debugfs_create_file(name, 0444,
297297
q->irq_ptr->debugfs_dev, q, &qstat_fops);
298298
if (IS_ERR(q->debugfs_q))
299299
q->debugfs_q = NULL;

0 commit comments

Comments
 (0)