Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751820AbdGIHIF (ORCPT ); Sun, 9 Jul 2017 03:08:05 -0400 Received: from mail-he1eur01on0100.outbound.protection.outlook.com ([104.47.0.100]:15680 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750859AbdGIHID (ORCPT ); Sun, 9 Jul 2017 03:08:03 -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> From: Peter Rosin Organization: Axentia Technologies AB Message-ID: <591290e2-5c63-52c2-b5a3-5417bc16dc27@axentia.se> Date: Sun, 9 Jul 2017 09:07:55 +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: <4a9a39dd-86b0-9485-46f1-76f4f8f5a809@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: AM3PR07CA0147.eurprd07.prod.outlook.com (2603:10a6:207:8::33) To DB6PR0202MB2552.eurprd02.prod.outlook.com (2603:10a6:4:1b::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3b8ce3b3-5edb-49b1-1bb0-08d4c6993b85 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:DB6PR0202MB2552; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0202MB2552;3:bLOUQOUvESrsyNXt4GbVSHpuwiPjDvXSbakjKOHfDEfmMRbDo6kl7TRBpXEzzgw4h+Wg7JkVI+spma91ben0gm7DY53OpH4TwetCK4BdT8BMnLa/VWeeCjTq3j73bum25weLrG1QgQykDsuazny2mrtidCe96TbrSzgg0SRHqY5F7JkOMoMkE367S65rXNbPI3EMyS8JB+gy7aJuD+MhKhy+1AoNdDIDmmqOCP1EtbPI8FWg4O19J0Y9BdtgZc16SiZDdD9vT3D10BD8lLSRBrMHRgjpbXtdyRt7/Tjs25Qr5bNkgutfqPaAMzcFbvZS7ViO4OuRUXwqhcSICnKEmRG7YHZY/G4VHrRJWlgoV5eVtO1fPev8oG3cbe1QRFD132PqIaRTa3xdSXZe61U5qDRO/b+qMkh05AwdgJxzq+KODvtEsOuvlRfyDuFpydS3U/tX/gTTRduz8Pqs2QNOTdhXcQMaIV3+qVkBjeGAFfzc+sMAwLjlTHbgsaml11VQ4PJDAH4eqqDhBH+DpXggjWhoUZNyhDi+4WZ3VeNX7b11Rlxl6doFl9luWYug044z8PpzEupBGKhTCanSANSV8Lzr4IU7zTq9PI2Tsn+LaeWa05jjqvqfpxO1tIr03n8vBK2bBDNRUi3mPKt9W72GeDaMSk2L1rtS9a0UwNVnJ31kP6SokBjQtdAU3vUB7QwoWyHrzeOgAG5M/5OZYkroIg== X-MS-TrafficTypeDiagnostic: DB6PR0202MB2552: X-Microsoft-Exchange-Diagnostics: 1;DB6PR0202MB2552;25:BJTlp1cRFzM+p2Vmt8LK9PjaVArfrb0OO9i50e3pDvLgzspRyUVkP/CDJLuNgHamTnmNHXuNRav1fB7Srg2Kj6Gnjdp0q+5BtSDgxPOOsraupBgbh3BfG0ViqTrFdTS5S3YKlAf/BUxIGirGmz43x79EOa4joePuRUKWxkaF6w91450aB24/GR4J676ZZ0+gojxWjakrVVGhqJmJ7jT25tuipHbHuOwVdQ5bjCzErX8k8lth2XxykjkolMQMTh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E+cbbOkYZA+iSdCMNKTHEjL6VcXBSGGQxWEnT7KQlrYkRWP7GuJ6g8UC2xVvW0mHEldUBu8FwtgkKqk5H05js561t/r0S/EdLO6OitUhhqvvUxeX6CVobbVI/H8mqWXXssAQUB2VKupDuz0v5DDC3emnazhYEshWkTCjW1QFMDWeo3OCLVyrChLWb2Y1K8aRZHa9xS4zkoFnwroqkLVSQRRJNkq1MfJqtb5O3KjFMKYERGJ1gOwGWSyf+TLEVM7JfGreqzcRc6XxG3LKvr36gCajp0ACt5ax7rIKLFxpbF3beZgMZQuqZvH7zIgLV68rEZG0KY4Hy9SGMZnvXfmqlGt91aYB 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)(2017060910075)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6041248)(20161123562025)(2016111802025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(6072148)(6043046)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DB6PR0202MB2552;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DB6PR0202MB2552; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjZQUjAyMDJNQjI1NTI7NDpzUEQweHNHOCtUSld5MXZWTUFjdEJiSkE0?= =?utf-8?B?cHduT3lIeDhjck4wZTMzK3BuZHlqNmVROWo3N3RDQmR5WEhHRzVOUlBwZHRY?= =?utf-8?B?QUY1WTFWN0p0Y3JGTWxxUmJMODY5MDkwNnBzakpIUWt1MGMxMmFyQ2dWc0N5?= =?utf-8?B?c2VHUTFKaUQvRHhQL0c5Wk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ejJDbFRUZnNwNWFnVTdHYnQwTXZrY0Y0SmVKRkd6QWhjcXBuVnovczBr?= =?utf-8?B?eWFrS3ljVXY5d2Z1V0cvUUpSKzJ5MmlrcWxrb1FZSmp1WXp0SXJuNEw4anBk?= =?utf-8?B?S0pwV3IvaDBJcHlJeEExdkRRRUNPcDJubjBvV1RramZReXBOS2NYZjdGSDhE?= =?utf-8?B?STJTcUJaNTFXNVpkZzhyUWRid1RjR2FYQW5YNTJVb0ZSVlRGdk9UOGNlOWw5?= =?utf-8?B?bDhSeDZjTzRNWUJaR1lRQVV0VXdJRmxXQ25iazg4YVNBczM4eXR3SDJPR3ZP?= =?utf-8?B?eEtvaW9sakR5dXRESTc1NG8yU0NVUERqL08wbnhWbUY2YWtvREhZOU1taXNq?= =?utf-8?B?ZS9ub0dGMGlUTGlFclkwSUlHWGk4UFAyclByOGtIRUk4bXJZaExJNUlGL0hR?= =?utf-8?B?K0FJdExIRFVHNFFuajF4djFGR1hzcWVUSnFRRGFXQWh0SCtZanJNWEdlL0hI?= =?utf-8?B?SVNaUDlPcnFDaENoM2R0ZUdiTXlKMTBvYnpHT2J3bWR5b1QvQktsK0E3K3Iv?= =?utf-8?B?LzZxM2FNQUkwZHVtTXVTK3lNYndzZEFpWjhlMXZuSGY2SnZjYjlpTkdXbTJo?= =?utf-8?B?OFB0NDRieGZWVVZYc3hTYWNtVFM1RjJFejJPTjk0OHpXQ1hlRmt1Ympxb0lh?= =?utf-8?B?KzBQcmFtakMzSVY3NUp3TG04dXJEbWRvU2FRb0dJRWhDNU1UUnEvN1I4a29K?= =?utf-8?Q?U5DzxQIDbGp80S?= X-Forefront-PRVS: 03630A6A4A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(7370300001)(4630300001)(6009001)(6049001)(39400400002)(39830400002)(39410400002)(39450400003)(377454003)(377424004)(24454002)(5660300001)(74482002)(7736002)(81166006)(8676002)(2906002)(7350300001)(53546010)(53936002)(189998001)(42186005)(83506001)(38730400002)(23676002)(110136004)(305945005)(6246003)(86362001)(50466002)(31696002)(6116002)(3846002)(47776003)(230700001)(3260700006)(25786009)(117156002)(50986999)(6486002)(54356999)(76176999)(77096006)(478600001)(4001350100001)(36756003)(6666003)(65806001)(33646002)(229853002)(4326008)(66066001)(2950100002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:DB6PR0202MB2552;H:[192.168.13.3];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjZQUjAyMDJNQjI1NTI7MjM6R1BkazBJMitGUk4rcTdPaUFzck1UK3Rm?= =?utf-8?B?WkpXMXBqeTRNYnU0aHNqT0xsWnlHNHBOM2xsaVdYWW43V0p2QzcwU1d6SFpR?= =?utf-8?B?bjl1VDJzR2IwTEMxM281S3BPeUZLUVlleTVUeGxHcDAwcE1RazdJeHM0U2Qr?= =?utf-8?B?T1pSemt2NnZlSGQ3YlVUNmdDODF1Z0ozdCtNMWx6SElxU1pmWG9naVQxN2c1?= =?utf-8?B?NlFCdDVVd0t5bE1lT0tiTHZPbUdDZStNSW40TjlQVFI0QTRiWUo4RkxMNGVF?= =?utf-8?B?L1JsVzRGMVhLdFdBeE5rSVg0TW1GRE9jWU95UWVDOFdwSHB1M1l5ZFU2NVkx?= =?utf-8?B?VTUwQk9NejQvYWYvNHgvbCt6S21JSm4rU2tJWnF1S3M1Y2FrNzcyUTcvajBI?= =?utf-8?B?SlpsR0pqR0xOR0dKVk10Mk9JOVRPN05NcmxpcVlobk5uOURrWFBodExQNDNw?= =?utf-8?B?T25sUm11MzNMSU5kY0pNWmsybGVJbDhIYTk5ejhucGVmZVgwTzVYdmhidHhO?= =?utf-8?B?OGNCN2hnbXB4OW9XNDBVc2IrYjVZT243ZkVJck5SV3l3Z2w5bzRDa0NHSnJz?= =?utf-8?B?RUVkZ29zL2V4ZVBoZEtFek9IMGdWTDVmRmdiOXFOQml2OEVqMTlLcWtIdFBp?= =?utf-8?B?cEt2MElidU9UbW1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+ebbgg4CSdzHpYMQ+Oh3cfjltjJ6/ZM0JX9zoq3MxLbSLKgypU5DouY7MbZPDwRj5J5F9lSW64ztlTKemb9Vy69NFJsbmQqIn2dwbiQW3VOcW1KMZpghYYf5YEpi7X8SdBxk7HE9W6q3ABiiaQtGUVfDiA8TQsBMXztC6e3A6VyRGhNwveMrFP4zKG4Hg3tgtWY5iLzpGbr8BvEgvAkvaqlP+9UWzVwDjpDHlwPQNPEaS9bXFu1wZAt2QdAMJodtkDKrffsekMjDbDjRIjxVXshxIAVwI16BHMDqggUIrKwoWt8= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2017 07:07:59.2270 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0202MB2552 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2015 Lines: 62 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. 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); >>> >