All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: feng.wu@intel.com
Cc: kvm@vger.kernel.org
Subject: re: KVM: x86: Add lowest-priority support for vt-d posted-interrupts
Date: Thu, 11 Feb 2016 07:50:41 +0300	[thread overview]
Message-ID: <20160211045041.GA6196@mwanda> (raw)

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

             reply	other threads:[~2016-02-11  4:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11  4:50 Dan Carpenter [this message]
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

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=20160211045041.GA6196@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=feng.wu@intel.com \
    --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.