kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: KVM: x86: Add lowest-priority support for vt-d posted-interrupts
@ 2016-02-11  4:50 Dan Carpenter
  2016-02-12 14:00 ` [PATCH] KVM: x86: fix *NULL on invalid low-prio irq Radim Krčmář
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2016-02-11  4:50 UTC (permalink / raw)
  To: feng.wu; +Cc: kvm

Hello Feng Wu,

This is a semi-automatic email about new static checker warnings.

The patch 6228a0da8057: "KVM: x86: Add lowest-priority support for 
vt-d posted-interrupts" from Jan 25, 2016, leads to the following 
Smatch complaint:

arch/x86/kvm/lapic.c:875 kvm_intr_is_single_vcpu_fast()
	 error: we previously assumed 'dst' could be null (see line 868)

arch/x86/kvm/lapic.c
   867				dst = map->logical_map[cid][idx];
   868				if (!dst && !kvm->arch.disabled_lapic_found) {
                                    ^^^^
Patch introduces a new assignment and NULL check.

   869					kvm->arch.disabled_lapic_found = true;
   870					printk(KERN_INFO
   871						"Disabled LAPIC found during irq injection\n");
   872					goto out;
   873				}
   874	
   875				*dest_vcpu = dst->vcpu;
                                             ^^^^^^^^^
Old unchecked dereference.

   876			} else {
   877				for_each_set_bit(i, &bitmap, 16) {

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-12 14:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-11  4:50 KVM: x86: Add lowest-priority support for vt-d posted-interrupts Dan Carpenter
2016-02-12 14:00 ` [PATCH] KVM: x86: fix *NULL on invalid low-prio irq Radim Krčmář
2016-02-12 14:10   ` Wu, Feng
2016-02-12 14:27     ` Radim Krcmár
2016-02-12 14:32       ` Wu, Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).