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: <200907291102.38682.sheng@linux.intel.com>
Date:	Wed, 29 Jul 2009 11:02:36 +0800
From:	Sheng Yang <sheng@...ux.intel.com>
To:	kvm@...r.kernel.org
Cc:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
	Avi Kivity <avi@...hat.com>, linux-kernel@...r.kernel.org,
	Dan Carpenter <error27@...il.com>, corbet@....net,
	eteo@...hat.com, Julia Lawall <julia@...u.dk>
Subject: Re: [PATCH] kvm: remove superfluous NULL pointer check in kvm_inject_pit_timer_irqs()

On Wednesday 29 July 2009 06:46:38 Bartlomiej Zolnierkiewicz wrote:
> From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
> Subject: [PATCH] kvm: remove superfluous NULL pointer check in
> kvm_inject_pit_timer_irqs()
>
> This takes care of the following entries from Dan's list:
>
> arch/x86/kvm/i8254.c +714 kvm_inject_pit_timer_irqs(6) warning: variable
> derefenced in initializer 'vcpu' arch/x86/kvm/i8254.c +714
> kvm_inject_pit_timer_irqs(6) warning: variable derefenced before check
> 'vcpu'
>
> Reported-by: Dan Carpenter <error27@...il.com>
> Cc: corbet@....net
> Cc: eteo@...hat.com
> Cc: Julia Lawall <julia@...u.dk>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
> ---
>  arch/x86/kvm/i8254.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: b/arch/x86/kvm/i8254.c
> ===================================================================
> --- a/arch/x86/kvm/i8254.c
> +++ b/arch/x86/kvm/i8254.c
> @@ -713,7 +713,7 @@ void kvm_inject_pit_timer_irqs(struct kv
>  	struct kvm *kvm = vcpu->kvm;
>  	struct kvm_kpit_state *ps;
>
> -	if (vcpu && pit) {
> +	if (pit) {
>  		int inject = 0;
>  		ps = &pit->pit_state;
>
Oh, follow up for the recent zero day exploit, right? :)

Yes, vcpu NULL check is not necessary here.

Acked-by: Sheng Yang <sheng@...ux.intel.com>

-- 
regards
Yang, Sheng

> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ