diff mbox

[06/13] arch/powerpc/platforms/powernv/opal-dump.c: fix world-writable sysfs files

Message ID 1416502917-15820-7-git-send-email-tim.gardner@canonical.com
State New
Headers show

Commit Message

Tim Gardner Nov. 20, 2014, 5:01 p.m. UTC
From: Rusty Russell <rusty@rustcorp.com.au>

BugLink: http://bugs.launchpad.net/bugs/1391953

If you don't have a store function, you're not writable anyway!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 arch/powerpc/platforms/powernv/opal-dump.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/arch/powerpc/platforms/powernv/opal-dump.c b/arch/powerpc/platforms/powernv/opal-dump.c
index 79b44d2..23260f7 100644
--- a/arch/powerpc/platforms/powernv/opal-dump.c
+++ b/arch/powerpc/platforms/powernv/opal-dump.c
@@ -102,9 +102,9 @@  static ssize_t dump_ack_store(struct dump_obj *dump_obj,
  * due to the dynamic size of the dump
  */
 static struct dump_attribute id_attribute =
-	__ATTR(id, 0666, dump_id_show, NULL);
+	__ATTR(id, S_IRUGO, dump_id_show, NULL);
 static struct dump_attribute type_attribute =
-	__ATTR(type, 0666, dump_type_show, NULL);
+	__ATTR(type, S_IRUGO, dump_type_show, NULL);
 static struct dump_attribute ack_attribute =
 	__ATTR(acknowledge, 0660, dump_ack_show, dump_ack_store);