From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH v2 2/6] ACPI / bus: Do not traverse through non-existed device table Date: Mon, 05 Feb 2018 17:56:47 +0200 Message-ID: <1517846207.22495.28.camel@linux.intel.com> References: <20180201202012.36524-1-andriy.shevchenko@linux.intel.com> <20180201202012.36524-2-andriy.shevchenko@linux.intel.com> <68fea449-6478-3d6d-addf-79925ca62931@codeaurora.org> <1517517646.7000.1446.camel@linux.intel.com> <1517517921.7000.1447.camel@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com ([134.134.136.24]:20944 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752767AbeBEP4v (ORCPT ); Mon, 5 Feb 2018 10:56:51 -0500 In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: "Rafael J. Wysocki" Cc: Sinan Kaya , dmaengine , "Rafael J . Wysocki" , ACPI Devel Maling List , Sakari Ailus , Vinod Koul On Sun, 2018-02-04 at 08:18 +0100, Rafael J. Wysocki wrote: > On Thu, Feb 1, 2018 at 9:45 PM, Andy Shevchenko > wrote: > > On Thu, 2018-02-01 at 22:40 +0200, Andy Shevchenko wrote: > > > On Thu, 2018-02-01 at 15:32 -0500, Sinan Kaya wrote: > > > > On 2/1/2018 3:20 PM, Andy Shevchenko wrote: > > > > > When __acpi_match_device() is called it would be possible to > > > > > have > > > > > ACPI ID table a MULL pointer. To avoid potential dereference, > > > > > > > > NULL > > > > > > Thanks, will fix later. > > > > > > > Why not bail out here immediately if ids is null? > > > > > > Because of the code which wasn't in context of this patch. > > > > > > See also patch 1 in the series. > > > > > > It's about how acpi_driver_match_device() uses it. > > > > Btw, it makes device_get_match_data() to work properly on PRP0001 > > kind > > of devices. > > Maybe combine this one with the [1/6] then, it would make it somewhat > easier to follow what's going on. Sure, I will fold in. -- Andy Shevchenko Intel Finland Oy