Return-Path: Received: from ozlabs.org (bilbo.ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3yhdhr5fCWzDqwP for ; Wed, 22 Nov 2017 21:18:52 +1100 (AEDT) From: Michael Ellerman To: Vaibhav Jain , linuxppc-dev@lists.ozlabs.org, Frederic Barrat Cc: Philippe Bergheaud , Alastair D'Silva , Vaibhav Jain , Andrew Donnellan , Christophe Lombard Subject: Re: [PATCH v2] cxl: Check if vphb exists before iterating over AFU devices In-Reply-To: <20171122080809.14494-1-vaibhav@linux.vnet.ibm.com> References: <20171122080809.14494-1-vaibhav@linux.vnet.ibm.com> Date: Wed, 22 Nov 2017 21:18:51 +1100 Message-ID: <87r2sq39bo.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Vaibhav Jain writes: > During an eeh a kernel-oops is reported if no vPHB to allocated to the > AFU. This happens as during AFU init, an error in creation of vPHB is > a non-fatal error. Hence afu->phb should always be checked for NULL > before iterating over it for the virtual AFU pci devices. > > This patch fixes the kenel-oops by adding a NULL pointer check for > afu->phb before it is dereferenced. > > Signed-off-by: Vaibhav Jain > > --- > Changelog: > v2 -> Added the vphb NULL check to cxl_vphb_error_detected() [Andrew] Fixes: ? Stable? cheers