Received: by 10.223.164.202 with SMTP id h10csp5999879wrb; Tue, 21 Nov 2017 20:18:29 -0800 (PST) X-Google-Smtp-Source: AGs4zMYyYocPMDxmE8I2Fq1JSvE9EiJhXDxC6aY2ZTtjs9NAcI/eWMN0AGTbOLYaru/IiUuDVF+D X-Received: by 10.84.196.3 with SMTP id k3mr19932855pld.237.1511324309285; Tue, 21 Nov 2017 20:18:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511324309; cv=none; d=google.com; s=arc-20160816; b=XIpJaarCR1U/Cyk692VB/W+K8QuJr5yuXYNdpUSfrFQyek6CQfDeFLe+SEfUrG4e0s CRAQtjI54Pwzyn58m9HoT1QyDeQ2SimrmW8nbpJ9U5LOytsq9h3iGvUHjyEGQU4FUDcZ SGNOQpckQsk0FGAqGYV/KaSdTTCn7HXewVcwGUSCeB+qQbFgour9+1Vo9P46lYnFkD20 fSz9NGx8hpU7NuyahNlYgaFD7WmlhrB8dHQajWtBV6iqOaf3zP3KwX8/7M4Zjp1oCSX8 HTya4E+sljTA0QVFtlOvqJCZXLGFG3k3detcYaVB/7zZL31WzS3CB5BslPQXXAwoVnoR N2sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=WYxIGOymZKJOHTMII9uguXU5if665NG1s9kqeaaQJno=; b=w+Ly2KhpgHy9Ep2lXjBu/Tlfq4xdDId4GBhKteIXkzB4gcc2fVF8IPc3IJwaPhfox5 3zkBZF6Sv6nDCTMe4GlEhch/8a2vyzXiQGe8P/VIiIVBl5LbFLn7MwTbsP8W7pKlyQnb CZSehhnefM5MKwvjrK0HybjumGmnIiuaCLwa8y6A/MTfUUiLRs6nzHYBdd0qin4oExGq DZA/XgCE5JlNWs0vAcB09VxW/8NM83CRbm57LzdBRBYbrrx58RPnF3lx27J7LpqsK7Ex 7udN/Ahl0mvOyWuaX27T33ZrupRXqdO4/mZ3sb4FnxgIw6BehjOOzGuoEAjQh/SXye+C WweQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=iuJCHopg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c66si12402254pga.684.2017.11.21.20.18.18; Tue, 21 Nov 2017 20:18:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=iuJCHopg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751529AbdKVERk (ORCPT + 76 others); Tue, 21 Nov 2017 23:17:40 -0500 Received: from mail-dm3nam03on0059.outbound.protection.outlook.com ([104.47.41.59]:28175 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751409AbdKVERg (ORCPT ); Tue, 21 Nov 2017 23:17:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=WYxIGOymZKJOHTMII9uguXU5if665NG1s9kqeaaQJno=; b=iuJCHopgyak/5osGmJMDZjOFhYuK9IntCjaCA6kk6gbuGk1zQOgvqof/I17bfwKgzccUOUqsyZIjI53qtHI/HjbAHIUjcOPFRqsf1Fcmte4F9uLyY1X31U5sZNHIDVObHMH0fLzuUtOpLxnrKTAf+OcxN2a3Fh+e765SmCvNcKU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Vijendar.Mukunda@amd.com; Received: from [10.129.12.246] (125.21.194.1) by CY4PR12MB1671.namprd12.prod.outlook.com (10.172.72.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.218.12; Wed, 22 Nov 2017 04:17:30 +0000 Subject: Re: [PATCH] ASoC: amd: Add error checking to probe function To: "Deucher, Alexander" , "Agrawal, Akshu" , 'Guenter Roeck' , Liam Girdwood Cc: Mark Brown , Jaroslav Kysela , Takashi Iwai , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" , Dominik Behr , Daniel Kurtz References: <1511238476-10314-1-git-send-email-linux@roeck-us.net> From: "Mukunda,Vijendar" Message-ID: <832412fe-41bd-c68a-1b43-37b6d3c3eb48@amd.com> Date: Wed, 22 Nov 2017 15:22:43 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [125.21.194.1] X-ClientProxiedBy: MAXPR0101CA0027.INDPRD01.PROD.OUTLOOK.COM (10.174.62.141) To CY4PR12MB1671.namprd12.prod.outlook.com (10.172.72.143) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5dc9a000-89ec-4e6e-7988-08d5315ff4d3 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603199);SRVR:CY4PR12MB1671; X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1671;3:YMXjEWGJFkx3R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NeZaKItJ83N5G/nf/sCnLAPUkGcQAegLAOmKpautX+aM02vdiQbkJhxu1aUl34110VvMS4OdU77hShkTW9SuzuswGMbQCIgGY8A9UP7weCe13+HVLGcQpAI8q6yVal+4Xdze08iyjblTmS0G/izWKzWRY00+rZl/3IVdSO9bVFBGv/QTeuUD5ZhakACBHgCx89Flx6pUQafYdyS0xxRKK9y5RsTnOuLlg3Onh/Ztln1sXoL0hHfPdnVOUculXzx5Qv+ZbaAUrCVhc3XAQmk8MrcXxEvSC+uLcLs2xN5h8tdcGoEYwBN/e0mcth2fVRowjdn72HLgY3MDGq4e2;4:17jK8WOocmtGOAsWbHUFwxNDDdlT+nt7scJLytt8Nr4ZRgLChEprPFaAcQYTG6xbKFqATiT9mAMTaAwC3UNKXkN7o6zvIqUdkdkSA5PXyEcYiI0960TZaTQdfi1/gfjuGURA1ONzSkkY61EYe2v4cyIRX5Pmq6jnXEjCLRGb4TzAc7HpwzNuhjATUaVKbo7YcmvkDEBDeTwDyxp4TcLpkmTV3nTzGVYpsmjuXaLLLKQP3fPBNUZTNNes7+ZB1AtNNGMQsAMRMDrFFi8iZioK2tavQRx6JTHfPXFZr/NOFv31W9+ITX72c3vgKwwUq8N8tpSytqxTQpnv4jDZ3A1Org== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(3002001)(100000703101)(100105400095)(3231022)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123558100)(20161123564025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR12MB1671;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR12MB1671; X-Forefront-PRVS: 0499DAF22A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(6049001)(39860400002)(376002)(346002)(189002)(199003)(13464003)(24454002)(50466002)(39060400002)(316002)(54906003)(31686004)(4326008)(53546010)(97736004)(36756003)(6486002)(189998001)(58126008)(3846002)(81166006)(2950100002)(81156014)(230700001)(5660300001)(305945005)(93886005)(8676002)(52146003)(65826007)(8936002)(23676004)(16576012)(67846002)(64126003)(65806001)(83506002)(478600001)(90366009)(76176999)(110136005)(229853002)(6666003)(106356001)(53936002)(101416001)(50986999)(33646002)(105586002)(25786009)(66066001)(7736002)(77096006)(6246003)(72206003)(31696002)(16526018)(68736007)(2906002)(65956001)(6116002)(86362001)(47776003)(54356999)(2486003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1671;H:[10.129.12.246];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxNjcxOzIzOmpadjA1SHBFTHZvN2hTTWF2UlBEVXMyb0NL?= =?utf-8?B?bmZQK20yRW53aWVIeGdxOStjZDhVdW8xRmsxWFNSdXhPMWpobTdBNmlkZTJh?= =?utf-8?B?clhXRTVKL0tOb1lyOGRDYnBLdWZtWmhEVmcrRC9hdGxBa1NYaS96WHc4UlA1?= =?utf-8?B?Z1I2OXJaZ0ZjM0E1alg0d0FnRmdSUFZXM2tMcWVuVi93OUJDam9XZzdHTHFW?= =?utf-8?B?U2xRc2xGZTJNRm5QZlY5V3RWb2xzZ3BJeGhudVRqeUdFak5GZW43WU8wWTBU?= =?utf-8?B?c3dzMTJ4eERKN1JPWlk0eWFablhQeWJPblA5ckorYUw5MFVDUWVUczFWdUY3?= =?utf-8?B?V09BMUN2cHpuLytPMHA5dzFHTzN0bFpua2lxK3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4xixXFDFUuvUF4eD8bx09hhQriT3F5WGrAvPtxm9gOCaZUvHYtkWk++iOo3TA0b3GJik+Rb3TyeaaniZnXy X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2017 04:17:30.8353 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5dc9a000-89ec-4e6e-7988-08d5315ff4d3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1671 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 21 November 2017 08:38 PM, Deucher, Alexander wrote: >> -----Original Message----- >> From: Agrawal, Akshu >> Sent: Tuesday, November 21, 2017 1:15 AM >> To: Deucher, Alexander; 'Guenter Roeck'; Liam Girdwood; Mukunda, >> Vijendar >> Cc: Mark Brown; Jaroslav Kysela; Takashi Iwai; alsa-devel@alsa-project.org; >> linux-kernel@vger.kernel.org; Dominik Behr; Daniel Kurtz >> Subject: Re: [PATCH] ASoC: amd: Add error checking to probe function >> >> >> >> On 11/21/2017 10:17 AM, Deucher, Alexander wrote: >>>> -----Original Message----- >>>> From: Guenter Roeck [mailto:groeck7@gmail.com] On Behalf Of Guenter >>>> Roeck >>>> Sent: Monday, November 20, 2017 11:28 PM >>>> To: Liam Girdwood >>>> Cc: Mark Brown; Jaroslav Kysela; Takashi Iwai; alsa-devel@alsa- >> project.org; >>>> linux-kernel@vger.kernel.org; Guenter Roeck; Deucher, Alexander; >> Dominik >>>> Behr; Daniel Kurtz >>>> Subject: [PATCH] ASoC: amd: Add error checking to probe function >>>> >>>> The acp_audio_dma does not perform sufficient error checking in its >> probe >>>> function. This can result in crashes if a critical error path is >>>> encountered. >>>> >>>> Fixes: 7c31335a03b6a ("ASoC: AMD: add AMD ASoC ACP 2.x DMA driver") >>>> Cc: Alex Deucher >>>> Cc: Dominik Behr >>>> Cc: Daniel Kurtz >>>> Signed-off-by: Guenter Roeck >>>> --- >>>> I didn't add an error check to acp_init() since I was not sure if >>>> its return value is ignored on purpose. >>> Vijendar, Akshu can you comment? >> This is also the case of missing error check. >> acp_init will return error if either sw reset did not happen or clock >> did not get enabled. In both cases we should error out in probe. >> > Can you send out a patch to enable that error checking? > > Thanks, > > Alex > on top of this patch will add more error checks and submit a new patch >>> The patch looks good to me. >>> Reviewed-by: Alex Deucher >>> >>>> sound/soc/amd/acp-pcm-dma.c | 7 +++++++ >>>> 1 file changed, 7 insertions(+) >>>> >>>> diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm- >>>> dma.c >>>> index 9f521a55d610..b5e41df6bb3a 100644 >>>> --- a/sound/soc/amd/acp-pcm-dma.c >>>> +++ b/sound/soc/amd/acp-pcm-dma.c >>>> @@ -1051,6 +1051,11 @@ static int acp_audio_probe(struct >> platform_device >>>> *pdev) >>>> struct resource *res; >>>> const u32 *pdata = pdev->dev.platform_data; >>>> >>>> + if (!pdata) { >>>> + dev_err(&pdev->dev, "Missing platform data\n"); >>>> + return -ENODEV; >>>> + } >>>> + >>>> audio_drv_data = devm_kzalloc(&pdev->dev, sizeof(struct >>>> audio_drv_data), >>>> GFP_KERNEL); >>>> if (audio_drv_data == NULL) >>>> @@ -1058,6 +1063,8 @@ static int acp_audio_probe(struct >> platform_device >>>> *pdev) >>>> >>>> res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >>>> audio_drv_data->acp_mmio = devm_ioremap_resource(&pdev- >>>>> dev, res); >>>> + if (IS_ERR(audio_drv_data->acp_mmio)) >>>> + return PTR_ERR(audio_drv_data->acp_mmio); >>>> >>>> /* The following members gets populated in device 'open' >>>> * function. Till then interrupts are disabled in 'acp_init' >>>> -- >>>> 2.7.4 From 1584688823463996643@xxx Tue Nov 21 15:10:30 +0000 2017 X-GM-THRID: 1584648462974285653 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread