From patchwork Thu Apr 26 11:15:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 10365631 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F0BED602DC for ; Thu, 26 Apr 2018 11:27:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1DCF29088 for ; Thu, 26 Apr 2018 11:27:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D635F29093; Thu, 26 Apr 2018 11:27:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EC1329088 for ; Thu, 26 Apr 2018 11:27:22 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0589226722C; Thu, 26 Apr 2018 13:16:55 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 23B3E26780D; Thu, 26 Apr 2018 13:16:53 +0200 (CEST) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0086.outbound.protection.outlook.com [104.47.34.86]) by alsa0.perex.cz (Postfix) with ESMTP id 0BB30267803 for ; Thu, 26 Apr 2018 13:16:49 +0200 (CEST) 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 To: 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 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/0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zgwP+cuGO48rWODKdEwde0QuXilCZ73b5OOdMjyrrj23WRv4dRn0ZzNpc3oymWNNSaUaARdbrAcg+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/O09xY8FHm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JHAKpLupa8nDVtHWRGrsia/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 Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Liam Girdwood , open list , Takashi Iwai , Jason Clinton , Mark Brown , Vijendar Mukunda , Alex Deucher , Akshu Agrawal , Guenter Roeck Subject: [alsa-devel] [PATCH 07/11] ASoC: amd: memory freeing for rtd structure X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }