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>hifive-unleashed-5.1
parent
ca92b93d17
commit
87ccdcfa9c
|
@ -339,8 +339,7 @@ dasd_proc_init(void)
|
||||||
dasd_proc_root_entry = proc_mkdir("dasd", NULL);
|
dasd_proc_root_entry = proc_mkdir("dasd", NULL);
|
||||||
if (!dasd_proc_root_entry)
|
if (!dasd_proc_root_entry)
|
||||||
goto out_nodasd;
|
goto out_nodasd;
|
||||||
dasd_devices_entry = proc_create_seq("devices",
|
dasd_devices_entry = proc_create_seq("devices", 0444,
|
||||||
S_IFREG | S_IRUGO | S_IWUSR,
|
|
||||||
dasd_proc_root_entry,
|
dasd_proc_root_entry,
|
||||||
&dasd_devices_seq_ops);
|
&dasd_devices_seq_ops);
|
||||||
if (!dasd_devices_entry)
|
if (!dasd_devices_entry)
|
||||||
|
|
|
@ -111,11 +111,8 @@ static const struct seq_operations tape_proc_seq = {
|
||||||
void
|
void
|
||||||
tape_proc_init(void)
|
tape_proc_init(void)
|
||||||
{
|
{
|
||||||
tape_proc_devices = proc_create_seq("tapedevices",
|
tape_proc_devices = proc_create_seq("tapedevices", 0444, NULL,
|
||||||
S_IFREG | S_IRUGO | S_IWUSR, NULL, &tape_proc_seq);
|
&tape_proc_seq);
|
||||||
if (tape_proc_devices == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -293,7 +293,7 @@ static void setup_debugfs_entry(struct qdio_q *q)
|
||||||
snprintf(name, QDIO_DEBUGFS_NAME_LEN, "%s_%d",
|
snprintf(name, QDIO_DEBUGFS_NAME_LEN, "%s_%d",
|
||||||
q->is_input_q ? "input" : "output",
|
q->is_input_q ? "input" : "output",
|
||||||
q->nr);
|
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);
|
q->irq_ptr->debugfs_dev, q, &qstat_fops);
|
||||||
if (IS_ERR(q->debugfs_q))
|
if (IS_ERR(q->debugfs_q))
|
||||||
q->debugfs_q = NULL;
|
q->debugfs_q = NULL;
|
||||||
|
|
Loading…
Reference in New Issue