lkml.org 
[lkml]   [2007]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 046/104] KVM: Remove stat_set from debugfs
    Date
    From: Rusty Russell <rusty@rustcorp.com.au>

    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>
    ---
    drivers/kvm/kvm_main.c | 6 +-----
    1 files changed, 1 insertions(+), 5 deletions(-)

    diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
    index 55639ac..25d76a5 100644
    --- a/drivers/kvm/kvm_main.c
    +++ b/drivers/kvm/kvm_main.c
    @@ -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)
    {
    --
    1.5.3
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-09-17 11:05    [W:0.018 / U:30.816 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site