Received: from eggs.gnu.org ([2001:4830:134:3::10]:53685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDY39-0007LR-SJ for qemu-devel@nongnu.org; Tue, 20 Jan 2015 07:36:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDY33-0003aG-MX for qemu-devel@nongnu.org; Tue, 20 Jan 2015 07:36:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDY33-0003Zv-Fd for qemu-devel@nongnu.org; Tue, 20 Jan 2015 07:36:45 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0KCailm004851 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 20 Jan 2015 07:36:45 -0500 From: Markus Armbruster References: <1421749530-13699-1-git-send-email-pbonzini@redhat.com> Date: Tue, 20 Jan 2015 13:36:42 +0100 In-Reply-To: <1421749530-13699-1-git-send-email-pbonzini@redhat.com> (Paolo Bonzini's message of "Tue, 20 Jan 2015 11:25:30 +0100") Message-ID: <87h9vliq79.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] apic: do not dereference pointer before it is checked for NULL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Paolo Bonzini writes: > Right now you only get to apic_init_reset if you have an APIC > (do_cpu_init is reached only if CPU_INTERRUPT_INIT is set and > that only happens in hw/intc/apic.c). However, this is wrong > because for example a port 92 or keyboard controller reset is > really an INIT, and that can happen also with no APIC. So > keep the check and fix the error that Coverity reported. > > Reported-by: Markus Armbruster > Signed-off-by: Paolo Bonzini Reviewed-by: Markus Armbruster