From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: re: KVM: x86: Add lowest-priority support for vt-d posted-interrupts Date: Thu, 11 Feb 2016 07:50:41 +0300 Message-ID: <20160211045041.GA6196@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: feng.wu@intel.com Return-path: Received: from aserp1040.oracle.com ([141.146.126.69]:43837 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750784AbcBKEu4 (ORCPT ); Wed, 10 Feb 2016 23:50:56 -0500 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: 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