Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753423AbdGJHks (ORCPT ); Mon, 10 Jul 2017 03:40:48 -0400 Received: from mail-eopbgr10112.outbound.protection.outlook.com ([40.107.1.112]:61679 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751835AbdGJHkp (ORCPT ); Mon, 10 Jul 2017 03:40:45 -0400 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=axentia.se; Subject: Re: [PATCH v2 1/1] mux: mux-core: Add NULL check for dev->of_node To: "Kuppuswamy, Sathyanarayanan" , sathyanarayanan.kuppuswamy@linux.intel.com Cc: linux-kernel@vger.kernel.org References: <4a9a39dd-86b0-9485-46f1-76f4f8f5a809@gmail.com> <591290e2-5c63-52c2-b5a3-5417bc16dc27@axentia.se> <27cdacb6-b775-f678-9ff0-6a3f2ad11e17@gmail.com> From: Peter Rosin Organization: Axentia Technologies AB Message-ID: Date: Mon, 10 Jul 2017 09:40:37 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <27cdacb6-b775-f678-9ff0-6a3f2ad11e17@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [81.224.168.30] X-ClientProxiedBy: HE1PR05CA0232.eurprd05.prod.outlook.com (2603:10a6:3:fa::32) To AM5PR0202MB2548.eurprd02.prod.outlook.com (2603:10a6:203:6d::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 53cf3a6a-903f-4b85-2bac-08d4c766f768 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:AM5PR0202MB2548; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0202MB2548;3:qF69Im1hDffN8MeotXFhRfqBZMC/Am+IBWCYa9zefUU1DbsSGQUcoPZh5hwRftbN/IagtmhbIJIaNYbcPIUJmNQiHqW/IgJaE6Zpssh4Z0ZV7bnjFlDgOyqAb9beKyjfCPEZISrgCNJ/E1OQmOxYax4vkJY0knZomnf3pYPzL+vgSaWMMy4GDmP1apSOYqcOv+8jf+wzYo7vrP8UQN7hFafIfHFSvwOerau722IhgYX4yKx/0TPdNjgq2rI30PXPj7jIo1zPklPD3GEzK2hV3gjyguUpt0fj/Z7SQ89t+gEPeDTkCz+81z9d0rZdEVeSJWd/AslexDNa4UPNXC9f9LCb8hoMUEMMiwLulpNeynDWdp+9ol+9zICP1INM8mu7mY6d0rqa3+OT2RP/z+5xdIlEIcpP6GMCX1uJ3xljAmO2XftHtEQLHWCtXc+ncigx5XR81hATjZlqEdlPpCzJwitzUHc+QDLs0kPQIq1oqm4mCAiQH+mJj2piE+HV8wRENaojXopLofwbNRscN05hOl41N66seTT+TUmuDK8oBTBYPss4IBhJRSJq299cm19gM3mBWErltU74z9jfdY5kM4dP4smmchLGmU5FK38rQSc3L3ZG8zuhAevnnlsweGylz7AfrFRiy1MC19lPUPE0UNvxuFB8i6CGxflgbdjBbCSBmcsxUwQp6LD9ay8lh+bo6cbnq5/Zv9I49og23R6qSg== X-MS-TrafficTypeDiagnostic: AM5PR0202MB2548: X-Microsoft-Exchange-Diagnostics: 1;AM5PR0202MB2548;25:ygvfmU9xSbj3opztkLPoGmpdD1GeJhp4/k9S81LHT0OxdQcwWMRb66IlS4XGNcIpP7YrgJYF2wWF6ing2oBWP66494uTAQ3gLCMFRrmZLG9gMvWLsF46fPyh04RvC6Eeji2hZVfmcBA3gD9kE7Imu4uki1/IXjgiPqxlM4uw5Ez7fbk2fDytp0ONG9uk8fsOXPoEoUW+a0VdXpXxZ9qGa7YqbwpTkpcGE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0slKVbnA4+EsKV/OwTTmaBGZ/4GezHFyIQqwlTm/jhwzNmNddHNLa9OBPUKJ4vHJndrPsmSMWxJ9xDrbbAEkZ+EmCB+hk/bOgK3WAfywngn7w8AIFANXhNevOW+A9WjltGONEU+sWfQVzlmLz+fG9/MmCnHEaOoWpwFehh0uxewfD+r40E96nPJtYx5mwaBHbMEcxJ6h/745aZgfMgCb2Ht53rnjcVBnwxWPaZxO5G5a/MYvYyhJ9hSoXvUawNFqSCuvxgb1GXgOdyrzhS9PXALplhbXSi9v0FwNCofYOUmSUaUGVfN04X7rYX0tIXXhe5fprK3XtLv5ksgitefSKDDfycYwnWbeTO+YGXiehPEAbfKDdhNQsFK2gf4UU2O7WtzDlhB0HT5TvJDhB0y X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(148574349560750)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(2017060910075)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(2016111802025)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(20161123555025)(6072148)(6043046)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:AM5PR0202MB2548;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:AM5PR0202MB2548; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjAyMDJNQjI1NDg7NDpUTmxiWXFYV0E5WFB4Ti9ZQnlyeEFtc1FL?= =?utf-8?B?T2Eva2d1d0V4Q1o5ZjZGZWYrZlRzVnlwT2RXVE0zVTY1bTJxUEpMRFMxc1Yz?= =?utf-8?B?RzlFMDlCVVgzOHZhQldMRWsvdE1vS0Q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WFdpYm91NzFRM2Z2SHZ5WnlZdVdLZmR3YWRzS2RGcTZaQXZy?= =?utf-8?B?S0JRVnBINEZYbG1oQUFpT3g3N01nM3hMcm9oM2NaZE5WUzg0bDl2UituU1dV?= =?utf-8?B?bC9ZZDZ1ekFVWjBLL2NkZVJhdXg2djZLbThiYkpUS0p4bHJvS2ZpS29tMis2?= =?utf-8?B?Y2NYN0hWL1F5WkVMckJCSU1TUkMwQmxxUkJWZ2lwQitkY2NyeDZYS1NMYmtT?= =?utf-8?B?T2xSZGdlZVpsU1NwbjdZYk0wYVRxa25TVndSVGdpdldNQ2cwczJsUjBhUG1B?= =?utf-8?B?N1ZzY0dJRE9zZk5wbnowR0hCYzBnWURKZXJ6c2JmZTBYM3lZWk8xRmxOdWJV?= =?utf-8?B?dzcxRVFzbkxMRkV3dDIydWJZQmR6TUEyejNnUXVKRndkRUNzNDF5NzVnRDZF?= =?utf-8?B?aUpTMFU5cVBFSFVZWW1DdW5iTGxQRmpxNjVpMlR3aithbGhwWjliSnlNRnRt?= =?utf-8?B?VFJENjR2R0M3OWNsTFZCOHd1WjNNWHY3TkprNW4wZEduWkZNWHE3cHgraW50?= =?utf-8?B?dzhCbUtPMUNvYXZHcE5wQkdKelc2SXdEcnBJYkVPMmROZG5Pb2d6SC9oelVi?= =?utf-8?B?VHVaaTNxWEZlTyttRXAwNmJyVGZBQk9LVG5Dd1JIMEp4L1loaU1abXVwZkNx?= =?utf-8?B?NS9UUHZ2N0VZdzFweFFBREloa01POVQ5Z0pQU3JFL0VnZkRmaVRQZGJEMG82?= =?utf-8?B?YXFta3RYNTVta3VBYXVhZTM0bUM3YzB2bU1qdmhPdkJuY2VsT2ZXNktmSnVZ?= =?utf-8?Q?3WAm+Lk9ehW1CN?= X-Forefront-PRVS: 03648EFF89 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(7370300001)(4630300001)(6049001)(6009001)(39400400002)(39830400002)(39450400003)(39410400002)(377424004)(24454002)(377454003)(33646002)(31686004)(5660300001)(117156002)(42186005)(4001350100001)(23676002)(50986999)(74482002)(76176999)(93886004)(54356999)(86362001)(64126003)(31696002)(478600001)(50466002)(7736002)(66066001)(47776003)(6486002)(6666003)(77096006)(65806001)(65956001)(2950100002)(229853002)(189998001)(2906002)(7350300001)(6116002)(36756003)(230700001)(25786009)(83506001)(4326008)(110136004)(38730400002)(53546010)(81166006)(8676002)(3846002)(6246003)(65826007)(305945005)(53936002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:AM5PR0202MB2548;H:[192.168.13.3];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjAyMDJNQjI1NDg7MjM6d0ZoNnNOOWxodFZDc3hsMjRqN2pGbC9T?= =?utf-8?B?UEFpekZjV0s4dThLK3JsU3NsWmgxUWhTaWd2cktTeGVBWUlPSU9oYWM1aWJr?= =?utf-8?B?eWF6NENCbFlsYVNHKzFEQmQzS003a085bzlmSVpPd1NMcHNCQnZmYlNZOVM3?= =?utf-8?B?SVhZKzg2Tm5yYVVKN0d1cXlPTzZLSVRoaFpjZVB4NDVzK0ZvczlGTHZIeVV3?= =?utf-8?B?eFo3NTVaUWlyYVludzY0QmVrY2l0N2l1VmFCRE1aNUlRcjQyRFVwSEJXWmVT?= =?utf-8?B?dzk3R21pNGIyZ2c0ek4rejVGZG82Zi9GeFp4ZEZCTTdzZENMSlFYZjRrSTJI?= =?utf-8?B?dS9yV2NBRnhqdkJ1ZTRtdDc1VUREbkdPVlVnNEtIUGwrUzJ6a3EzM1oyT29P?= =?utf-8?B?eE1rbXRCMWlrY2thTTZ6RjZ5a3JRR0JpM3AxdFFZdkFmOWlVZmtpWFpLUDBI?= =?utf-8?B?RjN5UTFUVzBiUTVUUDdtMG1xaFhjZXQvbWpnQU9lTEFzcXpQUDB5Zmd5MVZ4?= =?utf-8?B?czg3RDFLbVlzMFBzcVNQYkhtSXk2WVp5b1BYZFhOYzRJRWRNTi9OVWx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2X5WUsa7EisVNNqfqsmqYxZu3PSS1JbAvJDeFy54Fhil/qF9xxuziJueongpXaZFu6YpYPN9scW9sfmLM3iSuOnOUp9Vmd/R5oWgVYlbUT6uiLy0RTOKhZirCBdgv/QjG2LNDZZHqHDSE6Ny+ImycU3BZ2bDPtH3EreOiPWOCJCDptrZmhyLzqCMZJlb3fkOBwRNb2Y0hdkaYK9JYhfJ1u7INyhTnuiBK7/4GlbZr8/CysEytASesDetIVJ3arzBWWkWMhWBJOLe3+BhAfkg2F8eRf5vT+ZDmvYcLzQ8KHhcpzuqkQfSHzhYThbS0kLXwmk8sL+C4CGyXUv3zlCah/bjlxAIhJ/rfk/6/vmQ27Cy5xN8/iKJ47/aT3fz3pfSmIylCCLF76+oF4fcmAG7ZstNLVrjrc0g+bCze76G53Uv1jyy8hCTn2Kf4S/1bkmbQHIvp7g3Z+ed1V487BPZYmuxNKcFcJZUNo/QQ4lo4RXxDt7/cJ+CcB16jt6/Hy1ofUqMlUM2vC5VcKYdACedH9ZZ4t/dc7FKsJxFHh8pOAiJaXurATA+dm2Lmy+u++t+lad/Mw4AIzAsm2VN0= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2017 07:40:41.1223 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0202MB2548 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3234 Lines: 92 On 2017-07-09 09:35, Kuppuswamy, Sathyanarayanan wrote: > Hi, > > > On 7/9/2017 12:07 AM, Peter Rosin wrote: >> On 2017-07-09 01:12, Kuppuswamy, Sathyanarayanan wrote: >>> Hi Peter, >>> >>> >>> On 7/8/2017 2:00 PM, Peter Rosin wrote: >>>> On 2017-07-07 23:46, sathyanarayanan.kuppuswamy@linux.intel.com wrote: >>>>> From: Kuppuswamy Sathyanarayanan >>>>> >>>>> If dev->of_node is NULL, then calling mux_control_get() >>>>> function can lead to NULL pointer exception. So adding >>>>> a NULL check for dev->of_node. >>>>> >>>>> Signed-off-by: Kuppuswamy Sathyanarayanan >>>> Do you have a driver that might call mux_control_get and not have any >>>> of_node? >>> For non-device tree drivers, this case is valid. I hit this issue when I >>> was working on Intel USB MUX driver. >>>> If not, I don't see the point of this check. >>> Since this is an API for other consumers, I think its better to have >>> some sanity checks. >>> >>> If a non device tree driver call this API , I think its better to fail >>> with some error no instead of creating null pointer exception. >> Is it? When authoring a new driver, and you make some error like this, why >> is a "nice" error better than a big fat fail? If you get a null deref, >> you will presumably also get a call stack etc, which will help you find >> where you made the error, w/o adding a bunch of traces to find out exactly >> what you did wrong. > In this case, I think the error can happen even if there is any > configuration mismatch in device tree blob. So its not only No, it cannot happen for any of the existing consumers. And seeing crashes if the DT blob is faulty isn't unexpected. I'm sure the ways to provoke a crash in that situation are abundant. > about API usage in driver. If you think that you need to fail the system > if the API is used without proper dt node configuration, > then we should use something like BUG or WARN_ON to explicitly mention > this dependency. But I think its better to But this is something that *cannot* happen unless you add some new code somewhere else. Why check at all? > leave this decision to the MUX consumers because there use cases where > MUX control can be optional This is only future-proofing for consumers that does not exist, and does nothing for the existing code. And the future where this is needed might never happen. Still skeptic... Cheers, peda >> >> So, I'm skeptic... >> >> Cheers, >> peda >> >>>> Cheers, >>>> peda >>>> >>>>> --- >>>>> drivers/mux/mux-core.c | 3 +++ >>>>> 1 file changed, 3 insertions(+) >>>>> >>>>> Changes since v1: >>>>> * Removed dummy new line. >>>>> >>>>> diff --git a/drivers/mux/mux-core.c b/drivers/mux/mux-core.c >>>>> index 90b8995..924c983 100644 >>>>> --- a/drivers/mux/mux-core.c >>>>> +++ b/drivers/mux/mux-core.c >>>>> @@ -438,6 +438,9 @@ struct mux_control *mux_control_get(struct device *dev, const char *mux_name) >>>>> int index = 0; >>>>> int ret; >>>>> >>>>> + if (!np) >>>>> + return ERR_PTR(-ENODEV); >>>>> + >>>>> if (mux_name) { >>>>> index = of_property_match_string(np, "mux-control-names", >>>>> mux_name); >>>>> >