Commit 2d1e8b3f authored by Wanpeng Li's avatar Wanpeng Li Committed by Linus Torvalds

mm/hwpoison-inject.c: change permission of corrupt-pfn/unpoison-pfn to 0200

Hwpoison injection doesn't implement read method for
corrupt-pfn/unpoison-pfn attributes:

# cat /sys/kernel/debug/hwpoison/corrupt-pfn
cat: /sys/kernel/debug/hwpoison/corrupt-pfn: Permission denied
# cat /sys/kernel/debug/hwpoison/unpoison-pfn
cat: /sys/kernel/debug/hwpoison/unpoison-pfn: Permission denied

This patch changes the permission of corrupt-pfn/unpoison-pfn to 0200.
Signed-off-by: default avatarWanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: default avatarNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 29b4eede
...@@ -88,12 +88,12 @@ static int pfn_inject_init(void) ...@@ -88,12 +88,12 @@ static int pfn_inject_init(void)
* hardware status change, hence do not require hardware support. * hardware status change, hence do not require hardware support.
* They are mainly for testing hwpoison in software level. * They are mainly for testing hwpoison in software level.
*/ */
dentry = debugfs_create_file("corrupt-pfn", 0600, hwpoison_dir, dentry = debugfs_create_file("corrupt-pfn", 0200, hwpoison_dir,
NULL, &hwpoison_fops); NULL, &hwpoison_fops);
if (!dentry) if (!dentry)
goto fail; goto fail;
dentry = debugfs_create_file("unpoison-pfn", 0600, hwpoison_dir, dentry = debugfs_create_file("unpoison-pfn", 0200, hwpoison_dir,
NULL, &unpoison_fops); NULL, &unpoison_fops);
if (!dentry) if (!dentry)
goto fail; goto fail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment