Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1581898ybc; Sun, 17 Nov 2019 03:06:53 -0800 (PST) X-Google-Smtp-Source: APXvYqyRakLjflA9hu4vaq1lUcqjDzl86NmTdQDl39yedoVwbCMR1abbNwD8vZhZz/ZqFVvHF+1f X-Received: by 2002:a17:906:6852:: with SMTP id a18mr17482523ejs.193.1573988813521; Sun, 17 Nov 2019 03:06:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573988813; cv=none; d=google.com; s=arc-20160816; b=uw/8fcLZTEqG5qgALYdgmFtlZJ8UBRVWugTuPirZ34KfQj1OorNexwmRp2poImBpDq NEXxrNsl7XbQJ3IosN4ef8EHaJsVAUUacorg5dWbbloIlhK3PbTTmM9SNdY8qGwzpgiR DBCS2fBhLdc9lko8eS668FlKxKEx//cVDudCFN2vwqAm9Xfybwd54evvAsbyT1frrJsz WsrC9o10SXT/g0M6WPNFz5cCqXaJw22Ad/WWobaLan8+1X+ovYTL5JhpjIeIhcjNafb4 S2Vqg5Xo3b/Jx1kVOyodL6VSsNR5FSGF37C7wp27HyyHgAy7CN08SIFhIBOMrH3vqOEF JPxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date; bh=RyxedeG41HLAtwQFPRrMpy2JE/aYIp8K8f0rTPOioeE=; b=QEfh0YkGj8D7fHgtOIibcSwEVDqSD39i2n/A1jSrMnFK5D7tYPI4i+UtFnByN8cvW9 KzkCn7VEzMa1HyN9e6n5THcwwREG6EIN+Rs/o6TeXbPDbufHNm+lL2lztLRHQerUk+5B sJe+0LkyNxmeCAaQ9ac7TnbEHRAhSUY8+FjWcWkSfI4A3AwEuN+h4PN2aDiHrj6nV80a tofErADmuykdk9e0fMq/7VeurpedOyHw4wEPAohjTJzTUATxiZy6pwZlApWgUNGXJ/uP z+GlvxSyTL3cUU7GP0vDXTmwjH9oQ7iaymvgO++PukL4FmlNorV3ah5f0erucI6EVHrN f22g== ARC-Authentication-Results: i=1; mx.google.com; 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 f7si10381291edy.92.2019.11.17.03.06.29; Sun, 17 Nov 2019 03:06:53 -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; 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 S1726243AbfKQLFQ (ORCPT + 99 others); Sun, 17 Nov 2019 06:05:16 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:39589 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725974AbfKQLFQ (ORCPT ); Sun, 17 Nov 2019 06:05:16 -0500 X-IronPort-AV: E=Sophos;i="5.68,316,1569276000"; d="scan'208";a="327005211" Received: from abo-228-123-68.mrs.modulonet.fr (HELO hadrien) ([85.68.123.228]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Nov 2019 12:05:12 +0100 Date: Sun, 17 Nov 2019 12:05:12 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Ravulapati Vishnu vardhan rao cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Maruthi Bayyavarapu , Kuninori Morimoto , open list , Takashi Iwai , YueHaibing , Liam Girdwood , Akshu.Agrawal@amd.com, Sanju R Mehta , Ravulapati Vishnu vardhan rao , Mark Brown , djkurtz@google.com, Vijendar Mukunda , Alex Deucher , Colin Ian King , kbuild-all@lists.01.org Subject: Re: [alsa-devel] [RESEND PATCH v5 2/6] ASoC: amd: Refactoring of DAI from DMA driver (fwd) Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This code needs some work. You can't just kfree every pointer. YOu have to consider how the pointer was initialized. julia ---------- Forwarded message ---------- Date: Sun, 17 Nov 2019 12:48:14 +0800 From: kbuild test robot To: kbuild@lists.01.org Cc: Julia Lawall Subject: Re: [alsa-devel] [RESEND PATCH v5 2/6] ASoC: amd: Refactoring of DAI from DMA driver CC: kbuild-all@lists.01.org In-Reply-To: <1573629249-13272-3-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> References: <1573629249-13272-3-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> CC: Hi Ravulapati, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on asoc/for-next] [cannot apply to v5.4-rc7 next-20191115] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Ravulapati-Vishnu-vardhan-rao/ASoC-amd-Create-multiple-I2S-platform-device-Endpoint/20191113-230604 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next :::::: branch date: 4 days ago :::::: commit date: 4 days ago If you fix the issue, kindly add following tag Reported-by: kbuild test robot Reported-by: Julia Lawall >> sound/soc/amd/raven/acp3x-i2s.c:245:1-6: WARNING: invalid free of devm_ allocated data sound/soc/amd/raven/acp3x-i2s.c:248:1-6: WARNING: invalid free of devm_ allocated data sound/soc/amd/raven/acp3x-i2s.c:249:1-6: WARNING: invalid free of devm_ allocated data # https://github.com/0day-ci/linux/commit/74480eceed0f95f0b8d383d0882b918a335ce0d4 git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 74480eceed0f95f0b8d383d0882b918a335ce0d4 vim +245 sound/soc/amd/raven/acp3x-i2s.c 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 207 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 208 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 209 static int acp3x_dai_probe(struct platform_device *pdev) 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 210 { 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 211 int status; 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 212 struct resource *res; 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 213 struct i2s_dev_data *adata; 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 214 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 215 adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data), 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 216 GFP_KERNEL); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 217 if (!adata) 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 218 return -ENOMEM; 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 219 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 220 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 221 if (!res) { 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 222 dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n"); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 223 goto err; 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 224 } 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 225 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 226 adata->acp3x_base = devm_ioremap(&pdev->dev, res->start, 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 227 resource_size(res)); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 228 if (IS_ERR(adata->acp3x_base)) 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 229 return PTR_ERR(adata->acp3x_base); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 230 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 231 adata->i2s_irq = res->start; 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 232 dev_set_drvdata(&pdev->dev, adata); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 233 status = devm_snd_soc_register_component(&pdev->dev, 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 234 &acp3x_dai_component, 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 235 &acp3x_i2s_dai, 1); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 236 if (status) { 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 237 dev_err(&pdev->dev, "Fail to register acp i2s dai\n"); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 238 goto dev_err; 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 239 } 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 240 pm_runtime_set_autosuspend_delay(&pdev->dev, 10000); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 241 pm_runtime_use_autosuspend(&pdev->dev); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 242 pm_runtime_enable(&pdev->dev); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 243 return 0; 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 244 err: 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 @245 kfree(adata); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 246 return -ENOMEM; 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 247 dev_err: 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 248 kfree(adata->acp3x_base); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 249 kfree(adata); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 250 kfree(res); 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 251 return -ENODEV; 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 252 } 74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 253 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation