[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/hvm_event: fix uninitialized struct field usage introduced by c/s f5365e6


  • To: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxx
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Thu, 18 Feb 2016 12:47:21 +0200
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Keir Fraser <keir@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Thu, 18 Feb 2016 10:46:26 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=eGZQJ8QC21JOlozBctMqf7sUbGTZmt9arSPmplxYHbI8uGWhzu8mJFWiaFtEnlYlm50ETl4VGQz6xYH5OL9rQv31viCO4iNZ8WaKeQu9RBoSq8JyvfIqrKnBlpgCtov3/vo1XPFaxnTmmREdO4yuMKFqSW7RkF+57ni48AMd7FfJYeX3VOCIAqfb39r5Ww44mKa97oPesSKM2E0UVVc607auc5QSqSY+iKC34RxM0JVxeslp9gXNkvwBhndHs8JB0HXEm25ickFM0IVJKh/lOPPqhgmkEdFo4+UiKRuT7AqVuSfYvSRwp6gvp3mVq4EP6NJL0LkByEFkbDRfl45EvA==; h=Received:Received:Received:Received:Received:From:Subject:To:References:Cc:Message-ID:Date:User-Agent:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 02/18/2016 12:45 PM, Corneliu ZUZU wrote:
> c/s f5365e6: "xen/vm-events: Move parts of monitor_domctl code to 
> common-side",
> introduced a use without initialization issue.
> hvm_event_breakpoint calls hvm_event_traps(&req) and if sync is true that
> ors some bits into req->flags which was never initialised.
> Reported by Coverity Scan.
> 
> Initializes req @ hvm_event_breakpoint entry.
> 
> Signed-off-by: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx>
> ---
>  xen/arch/x86/hvm/event.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/arch/x86/hvm/event.c b/xen/arch/x86/hvm/event.c
> index 874a36c..cb9c152 100644
> --- a/xen/arch/x86/hvm/event.c
> +++ b/xen/arch/x86/hvm/event.c
> @@ -173,7 +173,7 @@ int hvm_event_breakpoint(unsigned long rip,
>  {
>      struct vcpu *curr = current;
>      struct arch_domain *ad = &curr->domain->arch;
> -    vm_event_request_t req;
> +    vm_event_request_t req = {};
>  
>      switch ( type )
>      {

Acked-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.