summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2013-02-18 20:09:03 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-18 20:18:13 +0100
commit74fef7a8fd1d2bd94f925d6638bb4c3049e7c381 (patch)
tree7236c4641dc73aafe2e8069f3fe1f5ec04f75a7b /drivers
parentdrivercore: Fix ordering between deferred_probe and exiting initcalls (diff)
downloadlinux-74fef7a8fd1d2bd94f925d6638bb4c3049e7c381.tar.xz
linux-74fef7a8fd1d2bd94f925d6638bb4c3049e7c381.zip
base: memory: fix soft/hard_offline_page permissions
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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/memory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index 987604d56c83..83d0b17ba1c2 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)
{