lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <677cf6bc-4f7b-f645-9b26-3bc315dc884c@redhat.com>
Date:   Fri, 2 Sep 2016 15:51:20 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Luiz Capitulino <lcapitulino@...hat.com>, kvm@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, rkrcmar@...hat.com,
        rostedt@...dmis.org, mhiramat@...nel.org, mtosatti@...hat.com
Subject: Re: [PATCH 1/4] kvm: kvm_destroy_vm_debugfs(): check debugs_stat_data
 pointer



On 31/08/2016 19:05, Luiz Capitulino wrote:
> This make it possible to call kvm_destroy_vm_debugfs() from
> kvm_create_vm_debugfs() in error conditions.
> 
> Signed-off-by: Luiz Capitulino <lcapitulino@...hat.com>
> ---
>  virt/kvm/kvm_main.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 1950782..c1dc45e 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -559,9 +559,11 @@ static void kvm_destroy_vm_debugfs(struct kvm *kvm)
>  
>  	debugfs_remove_recursive(kvm->debugfs_dentry);
>  
> -	for (i = 0; i < kvm_debugfs_num_entries; i++)
> -		kfree(kvm->debugfs_stat_data[i]);
> -	kfree(kvm->debugfs_stat_data);
> +	if (kvm->debugfs_stat_data) {
> +		for (i = 0; i < kvm_debugfs_num_entries; i++)
> +			kfree(kvm->debugfs_stat_data[i]);
> +		kfree(kvm->debugfs_stat_data);
> +	}
>  }
>  
>  static int kvm_create_vm_debugfs(struct kvm *kvm, int fd)
> 

Reviewed-by: Paolo Bonzini <pbonzini@...hat.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ