Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp584427pxj; Thu, 10 Jun 2021 07:58:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYvw2gbfaRdV/nXivhHXiTxh2MmGL8oJxUe2AzZ991E36sClt5PwG8I65IRY6gNjKz9/kY X-Received: by 2002:a17:906:d967:: with SMTP id rp7mr10578ejb.424.1623337102421; Thu, 10 Jun 2021 07:58:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623337102; cv=none; d=google.com; s=arc-20160816; b=0gLA1M2xsj+P4vEg6npu/7yCxcU7ZepZ2j9ruiGMX3bEch57TJUnrfm5SdUqCqMT63 0R6vgu1WK8IcSrdLtUlaVSFR//qgCB+WsrUiuEb8gISDc2Oz5ZwzU1a/Rm8+D4/y1fze wB80lYnkwbuxme29E5kVk0HvtwiZ6S85EOrYwx/h9XU/Hd/u3dPhvUvnN18CM5kZLxxk dn7wtBmSn3KeHFBRWAIAtDfNjxsyXftPCnROgdBjxRylf2aFpWSSZ6FqC9TUKJe+BvDJ PIOHvkpmQ6PzAwSd2ON/qykiSdb0nVNASoBiXrBMFI8+O0bL3WaI2Mu/2emjzlCq/Um3 PtCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=mhVOdPvsgUqxQBPqNDQF91B6rnGf0ptDfoVhD0S+h5s=; b=0Jc7AI85t+ab1feZm89jLohpVX6HT+1uj1ICai3KGRQwYepNjmEI6BwcnUDBHxrmct TJVrhFYRoWkOCu/9bng/TNXvrPsvc05y0dCIfSXmOvVxq9NAy9zw1D1ghjZ9JWkRo83G 1pBNCUMAwjR2X9vRT7DEypbv7CghnS59cuy/U35egaS/04ilflBsQF1xcYsDj9weMwbV bdHA9R4KcXEmzLxQ/zDlyaHdddbbSyDqOFMaz3gD8k+ZdBspravMxOInIj99OLRe4p5/ hjjLy7WaGYqkAMEhYpzHxCpyqqHzVRucerQFWMl+bs6TSJpoVasoSmzRcDGbeqg1Mhso ts9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v22si2391645eji.478.2021.06.10.07.57.59; Thu, 10 Jun 2021 07:58:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231513AbhFJO6q (ORCPT + 99 others); Thu, 10 Jun 2021 10:58:46 -0400 Received: from lizzard.sbs.de ([194.138.37.39]:59686 "EHLO lizzard.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230410AbhFJO6p (ORCPT ); Thu, 10 Jun 2021 10:58:45 -0400 Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 15AEuYlL023357 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Jun 2021 16:56:34 +0200 Received: from md1za8fc.ad001.siemens.net ([167.87.8.208]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 15AEuYIK028233; Thu, 10 Jun 2021 16:56:34 +0200 Date: Thu, 10 Jun 2021 16:56:32 +0200 From: Henning Schild To: Andy Shevchenko Cc: Mika Westerberg , "Linux Kernel Mailing List" , "open list:GPIO SUBSYSTEM" , Andy Shevchenko , "Linus Walleij" Subject: Re: [PATCH] pinctrl: intel: fix NULL pointer deref Message-ID: <20210610165632.0d9bb321@md1za8fc.ad001.siemens.net> In-Reply-To: References: <20210609062722.9132-1-henning.schild@siemens.com> <20210609130816.3631f0aa@md1za8fc.ad001.siemens.net> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Thu, 10 Jun 2021 17:32:46 +0300 schrieb Andy Shevchenko : > On Thu, Jun 10, 2021 at 05:25:04PM +0300, Andy Shevchenko wrote: > > On Wed, Jun 09, 2021 at 01:08:16PM +0200, Henning Schild wrote: > > > Am Wed, 9 Jun 2021 13:33:34 +0300 > > > schrieb Andy Shevchenko : > > > > ... > > > > > In order to use GPIO from the drivers i need to make sure > > > "broxton-pinctrl" comes up even if p2sb is hidden. > > > > > > Long story short, i thought the patch was simple enough to merge > > > even taken out of my special context. > > > > > > Currently intel_pinctl only works if "ps2b is not hidden by BIOS" > > > or "ACPI tables are correct", lifting the ban on the hidden p2sb > > > seems like a useful thing in general (i.e. sysfs gpio interface). > > > And i was hoping Andy would take the lead on that. It is > > > something my Siemens drivers would depend on, but really a > > > generic thing as far as i understand it. > > > > From p2sb series discussion it appears that this patch is not > > needed. The case is when BIOS already provides an ACPI device. > > > > So, the initial bug is in that series that needs to check if the > > ACPI device is exposed and forbid platform device instantiation in > > that case. > > Actually, I'm still thinking how this ever possible. We have all > drivers to provide SoC data pointers. match data may be NULL if and > only if the ACPI device provided is a new one that doesn't provide a > SoC data. > > So, w/o seeing ACPI table, I'm really puzzled here. Not sure what exactly you mean. Let us kill this thread and ignore the patch. It was posted out of context and the NULL deref code-path does not exist in the kernel, so the check is not needed. I will revisit the machine where your patch-series did lead to a double-init and EBUSY on claiming those memory ressources. And i will add ACPI info there as well. regards, Henning