From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:48130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggu9L-0004lx-3r for qemu-devel@nongnu.org; Tue, 08 Jan 2019 11:22:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggu9H-0002Pm-GJ for qemu-devel@nongnu.org; Tue, 08 Jan 2019 11:22:42 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:33940 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ggu9H-0001hT-Ap for qemu-devel@nongnu.org; Tue, 08 Jan 2019 11:22:39 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x08GLYIV092437 for ; Tue, 8 Jan 2019 11:22:22 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2pvvxc8shm-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 08 Jan 2019 11:22:22 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 8 Jan 2019 16:22:20 -0000 Date: Tue, 8 Jan 2019 17:22:14 +0100 From: Halil Pasic In-Reply-To: <20190108151114.33140-1-liq3ea@163.com> References: <20190108151114.33140-1-liq3ea@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20190108172214.25c6fc1e@oc2783563651> Subject: Re: [Qemu-devel] [PATCH v3] s390: avoid potential null dereference ins390_pcihost_unplug() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Li Qiang Cc: walling@linux.ibm.com, cohuck@redhat.com, rth@twiddle.net, david@redhat.com, borntraeger@de.ibm.com, qemu-s390x@nongnu.org, qemu-devel@nongnu.org On Tue, 8 Jan 2019 07:11:14 -0800 Li Qiang wrote: > When getting the 'pbdev', the if...else has no default branch. > From Coverity, the 'pbdev' maybe null when the 'dev' is not > the TYPE_PCI_BRIDGE/TYPE_PCI_DEVICE/TYPE_S390_PCI_DEVICE. > This patch adds a default branch for device plug and unplug. > > Spotted by Coverity: CID 1398593 > > Signed-off-by: Li Qiang Reviewed-by: Halil Pasic [..]