提交 3dea7ca7 编写于 作者: R Rusty Russell 提交者: Avi Kivity

KVM: Remove stat_set from debugfs

We shouldn't define stat_set on the debug attributes, since that will
cause silent failure on writing: without a set argument, userspace
will get -EACCESS.
Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: NAvi Kivity <avi@qumranet.com>
上级 54e11fa1
...@@ -3017,11 +3017,7 @@ static u64 stat_get(void *_offset) ...@@ -3017,11 +3017,7 @@ static u64 stat_get(void *_offset)
return total; return total;
} }
static void stat_set(void *offset, u64 val) DEFINE_SIMPLE_ATTRIBUTE(stat_fops, stat_get, NULL, "%llu\n");
{
}
DEFINE_SIMPLE_ATTRIBUTE(stat_fops, stat_get, stat_set, "%llu\n");
static __init void kvm_init_debug(void) static __init void kvm_init_debug(void)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册