All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] base: memory: fix soft/hard_offline_page permissions
@ 2013-02-18 19:09 Felipe Balbi
  2013-02-18 19:09 ` [BONUS PATCH 2/2] base: core: WARN() about bogus permissions on device attributes Felipe Balbi
  0 siblings, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2013-02-18 19:09 UTC (permalink / raw)
  To: Greg KH; +Cc: Linux Kernel Mailing List, Felipe Balbi

those two sysfs files don't have a 'show' method,
so they shouldn't have a read permission. Thanks
to Greg Kroah-Hartman for actually looking into
the source code and figuring out we had a real bug
with these two files.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/base/memory.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index 987604d..83d0b17 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -494,8 +494,8 @@ store_hard_offline_page(struct device *dev,
 	return ret ? ret : count;
 }
 
-static DEVICE_ATTR(soft_offline_page, 0644, NULL, store_soft_offline_page);
-static DEVICE_ATTR(hard_offline_page, 0644, NULL, store_hard_offline_page);
+static DEVICE_ATTR(soft_offline_page, S_IWUSR, NULL, store_soft_offline_page);
+static DEVICE_ATTR(hard_offline_page, S_IWUSR, NULL, store_hard_offline_page);
 
 static __init int memory_fail_init(void)
 {
-- 
1.8.1.rc1.5.g7e0651a


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-02-20  8:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-18 19:09 [PATCH 1/2] base: memory: fix soft/hard_offline_page permissions Felipe Balbi
2013-02-18 19:09 ` [BONUS PATCH 2/2] base: core: WARN() about bogus permissions on device attributes Felipe Balbi
2013-02-18 19:17   ` Greg KH
2013-02-18 19:20     ` Felipe Balbi
2013-02-19  9:59       ` Felipe Balbi
2013-02-20  5:01         ` Greg KH
2013-02-20  8:31           ` [PATCH] " Felipe Balbi

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.