From: Kishon Vijay Abraham I <kishon@ti.com>
To: Wei Yongjun <weiyongjun1@huawei.com>,
Hulk Robot <hulkci@huawei.com>, Jon Mason <jdmason@kudzu.us>,
Dave Jiang <dave.jiang@intel.com>,
Allen Hubbe <allenbh@gmail.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: <linux-ntb@googlegroups.com>, <linux-kernel@vger.kernel.org>,
Kishon Vijay Abraham I <kishon@ti.com>
Subject: Re: [PATCH -next] NTB: Drop kfree for memory allocated with devm_kzalloc
Date: Fri, 12 Feb 2021 18:18:31 +0530 [thread overview]
Message-ID: <ede29bb2-d501-4add-979a-baed99fe730c@ti.com> (raw)
In-Reply-To: <20210210075345.1096001-1-weiyongjun1@huawei.com>
On 10/02/21 1:23 pm, Wei Yongjun wrote:
> It's not necessary to free memory allocated with devm_kzalloc
> and using kfree leads to a double free.
>
> Fixes: 363baf7d6051 ("NTB: Add support for EPF PCI-Express Non-Transparent Bridge")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/ntb/hw/epf/ntb_hw_epf.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/ntb/hw/epf/ntb_hw_epf.c b/drivers/ntb/hw/epf/ntb_hw_epf.c
> index 2cccb7dff5dd..b019755e4e21 100644
> --- a/drivers/ntb/hw/epf/ntb_hw_epf.c
> +++ b/drivers/ntb/hw/epf/ntb_hw_epf.c
> @@ -723,7 +723,6 @@ static void ntb_epf_pci_remove(struct pci_dev *pdev)
> ntb_unregister_device(&ndev->ntb);
> ntb_epf_cleanup_isr(ndev);
> ntb_epf_deinit_pci(ndev);
> - kfree(ndev);
> }
Reviewed-by: Kishon Vijay Abraham I <kishon@ti.com>
>
> static const struct ntb_epf_data j721e_data = {
>
next prev parent reply other threads:[~2021-02-12 13:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 7:53 Wei Yongjun
2021-02-12 12:48 ` Kishon Vijay Abraham I [this message]
2021-02-12 17:45 ` Lorenzo Pieralisi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ede29bb2-d501-4add-979a-baed99fe730c@ti.com \
--to=kishon@ti.com \
--cc=allenbh@gmail.com \
--cc=dave.jiang@intel.com \
--cc=hulkci@huawei.com \
--cc=jdmason@kudzu.us \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntb@googlegroups.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=weiyongjun1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®