From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
To: gregkh@linuxfoundation.org, broonie@kernel.org
Cc: linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com
Subject: [PATCH 2/2] regmap: Fix permissions on debugfs cache controls
Date: Fri, 5 Jun 2015 15:34:46 +0100 [thread overview]
Message-ID: <1433514886-11884-3-git-send-email-rf@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1433514886-11884-1-git-send-email-rf@opensource.wolfsonmicro.com>
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@opensource.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
next prev parent reply other threads:[~2015-06-05 14:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-05 14:34 [PATCH 0/2] debugfs: support read-only and write-only bool types Richard Fitzgerald
2015-06-05 14:34 ` [PATCH 1/2] " Richard Fitzgerald
2015-06-05 16:42 ` Mark Brown
2015-06-08 20:57 ` Greg KH
2015-06-05 14:34 ` Richard Fitzgerald [this message]
2015-06-05 15:25 ` [PATCH 2/2] regmap: Fix permissions on debugfs cache controls Mark Brown
2015-06-05 15:53 ` Richard Fitzgerald
2015-06-05 16:53 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1433514886-11884-3-git-send-email-rf@opensource.wolfsonmicro.com \
--to=rf@opensource.wolfsonmicro.com \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.