From: "Xia, Chenbo" <chenbo.xia@intel.com>
To: Gaoxiang Liu <gaoxiangliu0@163.com>,
"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"liugaoxiang@huawei.com" <liugaoxiang@huawei.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v4] net/virtio: fix repeated memory free of vq
Date: Tue, 7 Sep 2021 05:08:00 +0000 [thread overview]
Message-ID: <MN2PR11MB406322FFBDC277F13974DA929CD39@MN2PR11MB4063.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210831143951.93-1-gaoxiangliu0@163.com>
> -----Original Message-----
> From: Gaoxiang Liu <gaoxiangliu0@163.com>
> Sent: Tuesday, August 31, 2021 10:40 PM
> To: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>
> Cc: dev@dpdk.org; liugaoxiang@huawei.com; Gaoxiang Liu <gaoxiangliu0@163.com>;
> stable@dpdk.org
> Subject: [PATCH v4] net/virtio: fix repeated memory free of vq
>
> When virtio_init_queue returns error, the memory of vq is freed.
> But the value of hw->vqs[queue_idx] does not restore.
> If virtio_init_queue returns error, the memory of vq is freed again
> in virtio_free_queues.
>
> Fixes: 69c80d4ef89b ("net/virtio: allocate queue at init stage")
> Cc: stable@dpdk.org
>
> Signed-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>
> ---
>
> v2:
> * Fix spelling warning
>
> v3:
> * Add detailed log
>
> v4:
> * Update the email address
> ---
> drivers/net/virtio/virtio_ethdev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/virtio/virtio_ethdev.c
> b/drivers/net/virtio/virtio_ethdev.c
> index 056830566..fc72d71cb 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -631,6 +631,7 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t
> queue_idx)
> rte_memzone_free(mz);
> free_vq:
> rte_free(vq);
> + hw->vqs[queue_idx] = NULL;
>
> return ret;
> }
> --
> 2.32.0
Better to make the author name and SOB tag use same email when applying.
For this patch:
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
next prev parent reply other threads:[~2021-09-07 5:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 23:30 [dpdk-dev] [PATCH v2] " Gaoxiang Liu
2021-08-03 23:45 ` Gaoxiang Liu
2021-08-05 8:08 ` Gaoxiang Liu
2021-08-29 8:50 ` [dpdk-dev] [PATCH v3] " Gaoxiang Liu
2021-08-31 14:39 ` [dpdk-dev] [PATCH v4] " Gaoxiang Liu
2021-09-07 3:41 ` Gaoxiang Liu
2021-09-07 5:08 ` Xia, Chenbo [this message]
2021-09-14 11:27 ` Maxime Coquelin
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=MN2PR11MB406322FFBDC277F13974DA929CD39@MN2PR11MB4063.namprd11.prod.outlook.com \
--to=chenbo.xia@intel.com \
--cc=dev@dpdk.org \
--cc=gaoxiangliu0@163.com \
--cc=liugaoxiang@huawei.com \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
/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;
as well as URLs for NNTP newsgroup(s).