Received: by 10.192.165.148 with SMTP id m20csp1926594imm; Thu, 26 Apr 2018 04:18:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqVxGP9SKpcyO99IJ3hrlbB9VfupVKWjEMZVWOzUNvdumVsPKCGu0qSswc24BQ8d1Diy2cp X-Received: by 10.99.173.3 with SMTP id g3mr6828907pgf.188.1524741515432; Thu, 26 Apr 2018 04:18:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524741515; cv=none; d=google.com; s=arc-20160816; b=O4NfCTm+dn88WW9Xui7rviQxsRv9S3ChAZLWUPXB2ITnr2fadFNeq2dN7XsOFzaxB1 aBz3+duk4DGPqaBclTnhwppCgAuSFw6fAGhYt2YOlFfG0kNQinPmiTdxExd09g9TmS7T osp/4GcugbAFDSM2JlJnfeQ2uvyOk6KztRZM4wVWEUKMZF1n+JZLxaM2cJOQArcAnVHo rZnnFCUK+Aqn3HjI8fuiZce+V+3XvnTxehP/MKmfj0+21MDoNL9t3YMDc/VI4UKfwcaD F5OjyPgfRWJ5QmeFARmH0zhrXcFQagsJJnGZZZsa/3eXirtI6Co2BpE33aJf9lKBePID CPzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:from:dkim-signature:arc-authentication-results; bh=s6jnFJFrrdf7BuNxYLRnM5cZDnQESbDVLY1WM0zJjgw=; b=0V5dt1OwoWJcoT6B632IUdAXJ/NiPNBDfYYYPkql+F0UFYHrGnOAAQL48ail0Asy5r S4j+6sJjeVnm1OlbGouEgtROdDAER+zfvcDKQoQdUKVKPLk/3zhLIO/VQGJZr7ib3+fr DKFqVWibtWe/Yd9SuqKtzb/VS4WxjgKJdVatcS1rXbgES95eu1q9OpSlXOuGBvieQzR5 eEOJ9E6oLWjPcQK8UgfamEDGYDtlAjGXdFGZ6HRAYlPSzVg4GlXPHLeBoovrag3xmeNg ISVQ3wBWMFrqkl9C7x5TpCKaEY+Il1c4l1/xvveUiwHaVylw0OaPuZbYxB6cFyWlyHIW rHZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=aDmkeboy; 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 x25si15367774pfj.347.2018.04.26.04.18.21; Thu, 26 Apr 2018 04:18:35 -0700 (PDT) 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=aDmkeboy; 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 S1755704AbeDZLQy (ORCPT + 99 others); Thu, 26 Apr 2018 07:16:54 -0400 Received: from mail-by2nam03on0064.outbound.protection.outlook.com ([104.47.42.64]:34183 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754801AbeDZLQt (ORCPT ); Thu, 26 Apr 2018 07:16:49 -0400 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=s6jnFJFrrdf7BuNxYLRnM5cZDnQESbDVLY1WM0zJjgw=; b=aDmkeboyBZqGX4U3B7FVlevgNTJ5P+YeAG5+8R3djWBFVIrbn6uE0tu9OlR80jruTpjdUXXf6/cqLOcvVRbUTTrw1fofJi17vcf1ptT0ErjdfQBc2s+NhsMmXimsMjwUTJb6lxu3NkGQBpS2fYd118Dt8AMlEdxqmJhqoFk3wrE= Received: from DM3PR12CA0077.namprd12.prod.outlook.com (2603:10b6:0:57::21) by SN1PR12MB0766.namprd12.prod.outlook.com (2a01:111:e400:c45b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.13; Thu, 26 Apr 2018 11:16:46 +0000 Received: from CO1NAM03FT020.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::209) by DM3PR12CA0077.outlook.office365.com (2603:10b6:0:57::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.696.13 via Frontend Transport; Thu, 26 Apr 2018 11:16:46 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; roeck-us.net; dkim=none (message not signed) header.d=none;roeck-us.net; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by CO1NAM03FT020.mail.protection.outlook.com (10.152.80.178) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.696.11 via Frontend Transport; Thu, 26 Apr 2018 11:16:46 +0000 Received: from LinuxHost.amd.com (10.34.1.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.382.0; Thu, 26 Apr 2018 06:16:44 -0500 From: Vijendar Mukunda CC: Vijendar Mukunda , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Alex Deucher , Akshu Agrawal , "Jason Clinton" , Guenter Roeck , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 07/11] ASoC: amd: memory freeing for rtd structure Date: Thu, 26 Apr 2018 16:45:53 +0530 Message-ID: <1524741374-13523-7-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524741374-13523-1-git-send-email-Vijendar.Mukunda@amd.com> References: <1524741374-13523-1-git-send-email-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(39380400002)(396003)(376002)(39860400002)(346002)(2980300002)(428003)(199004)(189003)(26005)(126002)(59450400001)(36756003)(446003)(104016004)(486006)(76176011)(476003)(109986005)(39060400002)(72206003)(2616005)(2906002)(16586007)(11346002)(47776003)(478600001)(50226002)(186003)(316002)(81166006)(8936002)(8676002)(5660300001)(81156014)(4326008)(50466002)(53416004)(105586002)(7696005)(97736004)(356003)(53936002)(48376002)(86362001)(1671002)(336012)(54906003)(51416003)(6666003)(305945005)(68736007)(426003)(77096007)(106466001)(266003);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR12MB0766;H:SATLEXCHOV01.amd.com;FPR:;SPF:None;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;CO1NAM03FT020;1:DhiYfcuv++Yj+TRsXivP1+lZ4HQeobnDXifEJHjlWPPXXB6EQ7ixu4+LWou1BVFnwT8mzQ3s/IklijqU9alIZTsSYdqLeFyC8aaHcMjC0V7aN8/g1/qLSI4go3Nj6tYN X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060);SRVR:SN1PR12MB0766; X-Microsoft-Exchange-Diagnostics: 1;SN1PR12MB0766;3:nuZne0ERggcWbI5At5ly/0ZEmn3PYAYQlmCL0unA7xge59XNCWIf3CQGxFcsBVE10XlVPao0K21iqn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3oymWNNSaUaARdbrAcg+CSDDJHpRV9dKEa6gS+kxRWFmI9LzJC7iOhYrYP0ndWkra729hv79zJeKiR2UoePhWHa4pGm2+3HHZXpknJgX0NdHliy+ajv2GCW7TIh30bFNRqCbHPdUd3xwk/yFyDqKTJSO1nfCgSdDiMgxr1pJrGtH0L+1GDTOihvtbXqcbjK3sbwKfMw/4nraKTa8ZZhq4VseLpwTjZefMwXGr1vMwfQ9HEVwvSHifQcd5KFFVqQZo/vji/ga9j11Nwvb3dlRqPfLzSyra5pvdwqPxOod65wkClvI+8y5Ir9QVJm1dEtVeCgg+RJ+S5AldMaWgRJ/YmgYYNLW79biPrhmwpXK+ItYhwBdfQ6of10aF7zPmE7J9ZJrnggc X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231232)(944501410)(52105095)(93006095)(93003095)(3002001)(6055026)(6041310)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011);SRVR:SN1PR12MB0766;BCL:0;PCL:0;RULEID:;SRVR:SN1PR12MB0766; X-Microsoft-Exchange-Diagnostics: 1;SN1PR12MB0766;4:pidsagQoefaSKiLEm8ZwoB8RuB6hKNhIbJcO27dD4QXnJWOBLZAuyJ6Rvw6r+aldXwws82uB8j9lCu6lQWrt/h8yoT2Y9cGAphgvbl+hwZ8GslSoRmPu+RPvQEaoEOsUA7OgrDZsdYV0ZkgQ2devwrlwlF7vaSflhTE+sCeLOMQzd8B47P8aKlflmpLGLv9ODWIZA9dfcaE/WY0m1Kzz6HTQXzVRstM+o7n8QwC/tIGyfjZVLX2tbwFJ2MGRHA2UrIhDDm6oKovAnib7vX+Tohqar+CGyyQuKwYFG/vMxfO2z5TeBTAkjlgvbA2kK6P+ X-Forefront-PRVS: 0654257CF5 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN1PR12MB0766;23:MSKJ+FN2+wZYzcvRUi8vdoAQ7DjWvar8ROZUb2Iqo?= =?us-ascii?Q?nQmkd+vY2l1tpbiEWAHUSSANAABRUU88CDWin56WLT55Y8DPhdZJ9ohzqIRH?= =?us-ascii?Q?NflS2V628kv50wjneRROF2070Lh7ZwAUZdWNWDJAU4u+llCa1jRmXFRCMTXN?= =?us-ascii?Q?icjmOkOvLVpwmiufPm+fV5YkIDY8QZ/xm6JLkYU9mHix/o+WQ7mNV+mTMcih?= =?us-ascii?Q?qwkhQs/ubs5XD/zgGJOLtA0weMO6p0fH/fg6U0GeGOIhCTebYlkItmvEB9lb?= =?us-ascii?Q?74k9QAMi4roytPS35gP5s60Pn0Dudl6h4unfFkyW0qs0SYH88st9hW6C5zbe?= =?us-ascii?Q?6EUUUp3v5o9qjzvk4na/3oxkdH7z1K1Y77PcJPb01WQDSISfEwfR0l69lkRl?= =?us-ascii?Q?AvW9TSRvrSKzJKNBI4Bsso/ZCUBJZy3wnfdvloMlJw94jLIJPGcMdJRAGAhE?= =?us-ascii?Q?xAYlpSnkGTdb3u23jvUMpnQ8wU6WlbeCgAYzTU98yefdWG0mfnsm0wAhxh5f?= =?us-ascii?Q?4gevb85G8yHPSajccQL84zlhHbSsEyg4yYlljstPBDIZCka5WkvuEHIJUysC?= =?us-ascii?Q?hFhUVSeJDeJjMupPLPEUdJ2D93QGdogy1EXu+34g77E6myTga632hLTEPOAU?= =?us-ascii?Q?uZK1qX8v4x8g1kvpe72BdVJ4MoEwtY5jIW+LwX51KC/DUoZBpa+z+dXz8rTv?= =?us-ascii?Q?jDasIcNTtEpcTbMOiS2r8kPPc9UVWjoMFz7JmQdrDPqIdorDy+BeIWMTnIXG?= =?us-ascii?Q?aX0M3tKWmL3BTNmQqtK0d40aO/VVBshfj/O09xY8FHmETlTQ2wOlk+HqgOrC?= =?us-ascii?Q?+vQ10qKuA2TRhgCVj6DzhQ+f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AYX7bQvkE4T6lHLTvtB4xLSo+ZBcrKQE5G4BZo7Ma0TB26G94oCHI6bBHjSUYyl6dq2CT3UtZTZCz1p8i5Jl4ZaC0gTn00nL++WvIOFhp6joBz3sOVtO4QN28ZbGBEeZlLW+iKb4A47IN2mWrjvkg8HxCoapuOg==;5:l34FtZH5TiGkbZDRCvcRag9VmaMbC0sDrhKqY7r998y3HNR/qip1ksmYJgjsIGrCEpQ5/D0cFr9ExxFNt37wnMHH6aLzl9sCtVf6f3Jd+fMV6mnfnnUxBkMAMXV2m15EGqq5/AB+c5bKvrCs1bSccnj3i7yF2nVm6JgZOqxneyo=;24:fZ+7kU/N2b9wiiNGGERTyBdRdaNXy6aTYBeLrVk4DLFt6I61UjzNsMDbAd1MOZmzHpwOm+qZZSHlSKqAKTS+g1nlhCWOUlVSUB8wGVwRfls= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN1PR12MB0766;7:hmukBl0HAkDUk6tdj85hcR2HoOyyL7lhU5RypaFzaBC48w0k63+DNVUbd0eD9KZBeTZ6nHpSfd+p9jO5mgt+ZYXoE2CEHYkexmUhBa/AShhb5Ih/kVKiRSXm62kVUesr2vZGwERfRHXTqkD9fZHN0Gu936FjHWdPQCIoBD+0SNbB5PkcDEAZPpzKnMy93goFkb/SAWk6FGl5P791WfZliylqKdBGuamRbE6sIkPEu+JdgwwQhdtaCE4BXFkASym/;20:SLj1zrd16DSKV9M4q57Nc3biLfA6DPRrq9pR4uowqHHm7rzWqIbPjRFqvCKKMMkCUOv9ApbXcqnTdhfqxnL8Q951VK0veZOpO/zFQJVwgtEaFEYVZQyfxlSEP166QlR5aVy1G9ehuQE7PftZ5Z9ccOEjSXu23lEDvicps+7kiKNC30gPS/oSpQGK6P1RGG7EyyePasRK+36F3gUPU5IKw6N04CFgKjKUvmUzSfJHAKpLupa8nDVtHWRGrsia/fsv X-MS-Office365-Filtering-Correlation-Id: 6b8c0b03-18c5-4d87-4d64-08d5ab6732b1 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2018 11:16:46.0286 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b8c0b03-18c5-4d87-4d64-08d5ab6732b1 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0766 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org rtd structure freed early may result in kernel panic in dma close call back. moved releasing memory for rtd structure to the end of dma close callback. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp-pcm-dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index b7bffc7..aa2fb38 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -990,8 +990,6 @@ static int acp_dma_close(struct snd_pcm_substream *substream) DRV_NAME); struct audio_drv_data *adata = dev_get_drvdata(component->dev); - kfree(rtd); - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { adata->play_i2ssp_stream = NULL; /* @@ -1020,7 +1018,7 @@ static int acp_dma_close(struct snd_pcm_substream *substream) */ if (!adata->play_i2ssp_stream && !adata->capture_i2ssp_stream) acp_reg_write(0, adata->acp_mmio, mmACP_EXTERNAL_INTR_ENB); - + kfree(rtd); return 0; } -- 2.7.4