diff options
| author | Wanpeng Li <liwanp@linux.vnet.ibm.com> | 2013-09-11 13:23:00 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-11 14:58:11 -0800 |
| commit | 2d1e8b3f1acc36101dbe6c5fc14e88e3f6af0b1c (patch) | |
| tree | 5c930f08e146de5969f34cb98e605d8394366f70 /mm/hwpoison-inject.c | |
| parent | 29b4eedee67b449534214058e1bcb36307a7f1dc (diff) | |
| download | linux-stable-2d1e8b3f1acc36101dbe6c5fc14e88e3f6af0b1c.tar.gz linux-stable-2d1e8b3f1acc36101dbe6c5fc14e88e3f6af0b1c.tar.bz2 linux-stable-2d1e8b3f1acc36101dbe6c5fc14e88e3f6af0b1c.tar.xz linux-stable-2d1e8b3f1acc36101dbe6c5fc14e88e3f6af0b1c.zip | |
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: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/hwpoison-inject.c')
| -rw-r--r-- | mm/hwpoison-inject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/hwpoison-inject.c b/mm/hwpoison-inject.c index 3a61efc518d5..afc2daa91c60 100644 --- a/mm/hwpoison-inject.c +++ b/mm/hwpoison-inject.c | |||
| @@ -88,12 +88,12 @@ static int pfn_inject_init(void) | |||
| 88 | * hardware status change, hence do not require hardware support. | 88 | * hardware status change, hence do not require hardware support. |
| 89 | * They are mainly for testing hwpoison in software level. | 89 | * They are mainly for testing hwpoison in software level. |
| 90 | */ | 90 | */ |
| 91 | dentry = debugfs_create_file("corrupt-pfn", 0600, hwpoison_dir, | 91 | dentry = debugfs_create_file("corrupt-pfn", 0200, hwpoison_dir, |
| 92 | NULL, &hwpoison_fops); | 92 | NULL, &hwpoison_fops); |
| 93 | if (!dentry) | 93 | if (!dentry) |
| 94 | goto fail; | 94 | goto fail; |
| 95 | 95 | ||
| 96 | dentry = debugfs_create_file("unpoison-pfn", 0600, hwpoison_dir, | 96 | dentry = debugfs_create_file("unpoison-pfn", 0200, hwpoison_dir, |
| 97 | NULL, &unpoison_fops); | 97 | NULL, &unpoison_fops); |
| 98 | if (!dentry) | 98 | if (!dentry) |
| 99 | goto fail; | 99 | goto fail; |
