All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: kbuild test robot <fengguang.wu@intel.com>,
	Joerg Roedel <jroedel@suse.de>
Cc: kbuild-all@01.org, kvm@vger.kernel.org
Subject: Re: [kvm:queue 76/76] arch/x86/kvm/../../../virt/kvm/irqchip.c:144:35: sparse: incorrect type in argument 1 (different address spaces)
Date: Mon, 08 Jun 2015 10:46:37 +0200	[thread overview]
Message-ID: <5575566D.5090200@redhat.com> (raw)
In-Reply-To: <201506060731.ugE5xMRv%fengguang.wu@intel.com>



On 06/06/2015 01:50, kbuild test robot wrote:
> tree:   git://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
> head:   6aa5e7eb06cff8d317328a0c4696b5f635ba6be3
> commit: 6aa5e7eb06cff8d317328a0c4696b5f635ba6be3 [76/76] kvm: irqchip: Break up high order allocations of kvm_irq_routing_table
> reproduce:
>   # apt-get install sparse
>   git checkout 6aa5e7eb06cff8d317328a0c4696b5f635ba6be3
>   make ARCH=x86_64 allmodconfig
>   make C=1 CF=-D__CHECK_ENDIAN__
> 
> 
> sparse warnings: (new ones prefixed by >>)
> 
>>> arch/x86/kvm/../../../virt/kvm/irqchip.c:144:35: sparse: incorrect type in argument 1 (different address spaces)
>    arch/x86/kvm/../../../virt/kvm/irqchip.c:144:35:    expected struct kvm_irq_routing_table *rt
>    arch/x86/kvm/../../../virt/kvm/irqchip.c:144:35:    got struct kvm_irq_routing_table [noderef] <asn:4>*irq_routing
>    arch/x86/kvm/../../../virt/kvm/irqchip.c:224:13: sparse: incorrect type in assignment (different address spaces)
>    arch/x86/kvm/../../../virt/kvm/irqchip.c:224:13:    expected struct kvm_irq_routing_table *old
>    arch/x86/kvm/../../../virt/kvm/irqchip.c:224:13:    got struct kvm_irq_routing_table [noderef] <asn:4>*irq_routing

I'm squashing this:

diff --git a/virt/kvm/irqchip.c b/virt/kvm/irqchip.c
index b56168fe018c..21c14244f4c4 100644
--- a/virt/kvm/irqchip.c
+++ b/virt/kvm/irqchip.c
@@ -141,7 +141,8 @@ void kvm_free_irq_routing(struct kvm *kvm)
 {
 	/* Called only during vm destruction. Nobody can use the pointer
 	   at this stage */
-	free_irq_routing_table(kvm->irq_routing);
+	struct kvm_irq_routing_table *rt = rcu_access_pointer(kvm->irq_routing);
+	free_irq_routing_table(rt);
 }
 
 static int setup_routing_entry(struct kvm_irq_routing_table *rt,


Paolo

      reply	other threads:[~2015-06-08  8:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05 23:50 [kvm:queue 76/76] arch/x86/kvm/../../../virt/kvm/irqchip.c:144:35: sparse: incorrect type in argument 1 (different address spaces) kbuild test robot
2015-06-08  8:46 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5575566D.5090200@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=fengguang.wu@intel.com \
    --cc=jroedel@suse.de \
    --cc=kbuild-all@01.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.