From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hanjun Guo Subject: Re: [PATCH] ACPI/IORT: Fix iort_get_platform_device_domain() uninitialized pointer value Date: Thu, 29 Nov 2018 19:34:40 +0800 Message-ID: References: <20181129095559.26007-1-lorenzo.pieralisi@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20181129095559.26007-1-lorenzo.pieralisi@arm.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Lorenzo Pieralisi , linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org Cc: Catalin Marinas , "Rafael J. Wysocki" , Will Deacon , Patrick Bellasi , Hanjun Guo , Sudeep Holla List-Id: linux-acpi@vger.kernel.org On 2018/11/29 17:55, Lorenzo Pieralisi wrote: > Running the Clang static analyzer on IORT code detected the following > error: > > Logic error: Branch condition evaluates to a garbage value > > in > > iort_get_platform_device_domain() > > If the named component associated with a given device has no IORT > mappings, iort_get_platform_device_domain() exits its MSI mapping loop > with msi_parent pointer containing garbage, which can lead to erroneous > code path execution. Not sure if we have such use cases that named component associated with a given device has no IORT mappings, but this patch still make sense to me, Reviewed-by: Hanjun Guo Thanks Hanjun