Re: [PATCH 8/9] KVM: Adjust seven checks for null pointers

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

 



Hi Markus,

[auto build test ERROR on kvm/linux-next]
[also build test ERROR on v4.10-rc4 next-20170120]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/SF-Markus-Elfring/KVM-Fine-tuning-for-several-function-implementations/20170123-022323
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
config: mips-malta_kvm_defconfig (attached as .config)
compiler: mipsel-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=mips 

All errors (new ones prefixed by >>):

   arch/mips/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_make_all_cpus_request':
>> arch/mips/kvm/../../../virt/kvm/kvm_main.c:187:7: error: the address of 'cpus' will always evaluate as 'true' [-Werror=address]
      if (cpus && cpu != -1 && cpu != me &&
          ^~~~
   cc1: all warnings being treated as errors

vim +187 arch/mips/kvm/../../../virt/kvm/kvm_main.c

   171	{
   172		int i, cpu, me;
   173		cpumask_var_t cpus;
   174		bool called = true;
   175		struct kvm_vcpu *vcpu;
   176	
   177		zalloc_cpumask_var(&cpus, GFP_ATOMIC);
   178	
   179		me = get_cpu();
   180		kvm_for_each_vcpu(i, vcpu, kvm) {
   181			kvm_make_request(req, vcpu);
   182			cpu = vcpu->cpu;
   183	
   184			/* Set ->requests bit before we read ->mode. */
   185			smp_mb__after_atomic();
   186	
 > 187			if (cpus && cpu != -1 && cpu != me &&
   188			      kvm_vcpu_exiting_guest_mode(vcpu) != OUTSIDE_GUEST_MODE)
   189				cpumask_set_cpu(cpu, cpus);
   190		}
   191		if (unlikely(cpus == NULL))
   192			smp_call_function_many(cpu_online_mask, ack_flush, NULL, 1);
   193		else if (!cpumask_empty(cpus))
   194			smp_call_function_many(cpus, ack_flush, NULL, 1);
   195		else

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux