Skip to content

Commit

Permalink
KVM: Remove stat_set from debugfs
Browse files Browse the repository at this point in the history
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: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Rusty Russell authored and Avi Kivity committed Oct 13, 2007
1 parent 54e11fa commit 3dea7ca
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3017,11 +3017,7 @@ static u64 stat_get(void *_offset)
return total;
}

static void stat_set(void *offset, u64 val)
{
}

DEFINE_SIMPLE_ATTRIBUTE(stat_fops, stat_get, stat_set, "%llu\n");
DEFINE_SIMPLE_ATTRIBUTE(stat_fops, stat_get, NULL, "%llu\n");

static __init void kvm_init_debug(void)
{
Expand Down

0 comments on commit 3dea7ca

Please sign in to comment.