patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Jayatheerthan, Jay" <jay.jayatheerthan@intel.com>
To: "Naga Harish K, S V" <s.v.naga.harish.k@intel.com>,
	"jerinj@marvell.com" <jerinj@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>,
	"David Marchand" <david.marchand@redhat.com>
Subject: Re: [dpdk-stable] [PATCH] eventdev/eth_tx: fix queue_del function
Date: Tue, 9 Nov 2021 09:24:32 +0000	[thread overview]
Message-ID: <DM6PR11MB4348BCA00F6C63A41AE733FAFD929@DM6PR11MB4348.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211109073334.3910034-1-s.v.naga.harish.k@intel.com>

+ David Marchand, who reported this issue.

The change looks good to me. You can add my ack.

> -----Original Message-----
> From: Naga Harish K, S V <s.v.naga.harish.k@intel.com>
> Sent: Tuesday, November 9, 2021 1:04 PM
> To: jerinj@marvell.com; Jayatheerthan, Jay <jay.jayatheerthan@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH] eventdev/eth_tx: fix queue_del function
> 
> This patch fixes heap-use-after-free reported by ASAN,
> please reference https://bugs.dpdk.org/show_bug.cgi?id=869
> 
> The application can use the queue_id as `-1` to delete all
> the queues of the eth_device that are added to tx_adapter
> instance.
> In above case, the queue_del api is trying to use number of
> queues from adapter level instead of eth_device queues.
> When there are queues added from multiple eth devices,
> it will result in heap-use-after-free as reported by ASAN.
> 
> This patch fixes the queue_del api to use correct number of
> queues.
> 
> Bugzilla ID: 869
> Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
> ---
>  lib/eventdev/rte_event_eth_tx_adapter.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
> index da55d2c2dc..c17f33f098 100644
> --- a/lib/eventdev/rte_event_eth_tx_adapter.c
> +++ b/lib/eventdev/rte_event_eth_tx_adapter.c
> @@ -864,7 +864,7 @@ txa_service_queue_del(uint8_t id,
>  		uint16_t i, q, nb_queues;
>  		int ret = 0;
> 
> -		nb_queues = txa->nb_queues;
> +		nb_queues = txa->txa_ethdev[port_id].nb_queues;
>  		if (nb_queues == 0)
>  			return 0;
> 
> --
> 2.25.1


  reply	other threads:[~2021-11-09  9:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-09  7:33 Naga Harish K S V
2021-11-09  9:24 ` Jayatheerthan, Jay [this message]
2021-11-09  9:54   ` David Marchand
2021-11-10  5:56 ` Naga Harish K S V
2021-11-10  6:00 ` [dpdk-stable] [PATCH v2] " Naga Harish K S V
2021-11-10 18:58   ` [dpdk-dev] " Jerin Jacob

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=DM6PR11MB4348BCA00F6C63A41AE733FAFD929@DM6PR11MB4348.namprd11.prod.outlook.com \
    --to=jay.jayatheerthan@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=s.v.naga.harish.k@intel.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).