[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1433514886-11884-3-git-send-email-rf@opensource.wolfsonmicro.com>
Date: Fri, 5 Jun 2015 15:34:46 +0100
From: Richard Fitzgerald <rf@...nsource.wolfsonmicro.com>
To: gregkh@...uxfoundation.org, broonie@...nel.org
Cc: linux-kernel@...r.kernel.org, patches@...nsource.wolfsonmicro.com
Subject: [PATCH 2/2] regmap: Fix permissions on debugfs cache controls
The cache_only and cache_bypass debugfs entries are expected
to be writable by user-side but are set to read-only permissions.
This is only working accidentally because debugfs doesn't currently
honour the read-only bit.
Signed-off-by: Richard Fitzgerald <rf@...nsource.wolfsonmicro.com>
---
drivers/base/regmap/regmap-debugfs.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index 5799a0b..a48579e 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -530,12 +530,12 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
}
if (map->cache_type) {
- debugfs_create_bool("cache_only", 0400, map->debugfs,
- &map->cache_only);
- debugfs_create_bool("cache_dirty", 0400, map->debugfs,
- &map->cache_dirty);
- debugfs_create_bool("cache_bypass", 0400, map->debugfs,
- &map->cache_bypass);
+ debugfs_create_bool("cache_only", S_IRUGO | S_IWUSR,
+ map->debugfs, &map->cache_only);
+ debugfs_create_bool("cache_dirty", S_IRUGO,
+ map->debugfs, &map->cache_dirty);
+ debugfs_create_bool("cache_bypass", S_IRUGO | S_IWUSR,
+ map->debugfs, &map->cache_bypass);
}
next = rb_first(&map->range_tree);
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists