public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Remove stat_set from debugfs
@ 2007-08-01  0:12 Rusty Russell
       [not found] ` <1185927142.6131.109.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Rusty Russell @ 2007-08-01  0:12 UTC (permalink / raw)
  To: kvm-devel

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-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>

diff -r 968bc14f06fd drivers/kvm/kvm_main.c
--- a/drivers/kvm/kvm_main.c	Tue Jul 31 19:34:48 2007 +1000
+++ b/drivers/kvm/kvm_main.c	Tue Jul 31 19:36:33 2007 +1000
@@ -3009,11 +3009,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)
 {



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-01 18:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-01  0:12 [PATCH] Remove stat_set from debugfs Rusty Russell
     [not found] ` <1185927142.6131.109.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-08-01 18:40   ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox