From 6656c21ca10e54a84673d0ec2f0cf5f676e66a40 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 6 Aug 2014 10:15:36 +0930 Subject: arch/powerpc/platforms/powernv/opal-elog.c: fix world-writable sysfs files If you don't have a store function, you're not writable anyway! Signed-off-by: Rusty Russell Acked-by: Stewart Smith --- arch/powerpc/platforms/powernv/opal-elog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powernv/opal-elog.c index 10268c41d830..925bad993e30 100644 --- a/arch/powerpc/platforms/powernv/opal-elog.c +++ b/arch/powerpc/platforms/powernv/opal-elog.c @@ -82,9 +82,9 @@ static ssize_t elog_ack_store(struct elog_obj *elog_obj, } static struct elog_attribute id_attribute = - __ATTR(id, 0666, elog_id_show, NULL); + __ATTR(id, S_IRUGO, elog_id_show, NULL); static struct elog_attribute type_attribute = - __ATTR(type, 0666, elog_type_show, NULL); + __ATTR(type, S_IRUGO, elog_type_show, NULL); static struct elog_attribute ack_attribute = __ATTR(acknowledge, 0660, elog_ack_show, elog_ack_store); -- cgit v1.2.1 From 76215b04fd297c008b91ece732ed36e67e0181fa Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 7 Aug 2014 22:38:55 +0930 Subject: arch/powerpc/platforms/powernv/opal-dump.c: fix world-writable sysfs files If you don't have a store function, you're not writable anyway! Signed-off-by: Rusty Russell --- arch/powerpc/platforms/powernv/opal-dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/powernv/opal-dump.c b/arch/powerpc/platforms/powernv/opal-dump.c index 788a1977b9a5..85bb8fff7947 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); -- cgit v1.2.1