DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Cc: jerinj@marvell.com, dev@dpdk.org, jay.jayatheerthan@intel.com,
	 stable@dpdk.org
Subject: Re: [PATCH] eventdev/eth_tx: fix service function
Date: Tue, 17 Jan 2023 21:30:46 +0530	[thread overview]
Message-ID: <CALBAE1Pq2oLJj2T6pLpJTWhtU-Rz4OpV3PVdycq20M585Ur3Gg@mail.gmail.com> (raw)
In-Reply-To: <20230107164058.3709813-1-s.v.naga.harish.k@intel.com>

On Sat, Jan 7, 2023 at 10:11 PM Naga Harish K S V
<s.v.naga.harish.k@intel.com> wrote:
>
> adapter service function is using RTE_ETH_FOREACH_DEV() macro for
> looping through all available eth devices and flushing any pending
> buffered packets.
>
> When Traffic Management nodes (vports) are added and deleted dynamically,
> there is a possibility of accessing the device info memory beyond the
> allocated limit which can result in segfaults. Fixed the logic to
> prevent illegal memory access.
>
> 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>


Updated the git commit as follows and applied to
dpdk-next-net-eventdev/for-main. Thanks

    eventdev/eth_tx: fix invalid memory access

    Adapter service function is using RTE_ETH_FOREACH_DEV() macro for
    looping through all available eth devices and flushing any pending
    buffered packets.

    When Traffic Management nodes (vports) are added and deleted dynamically,
    there is a possibility of accessing the device info memory beyond the
    allocated limit which can result in segfaults. Fixed the logic to
    prevent illegal memory access.

    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 88309d2aaa..ba7a1c7f1b 100644
> --- a/lib/eventdev/rte_event_eth_tx_adapter.c
> +++ b/lib/eventdev/rte_event_eth_tx_adapter.c
> @@ -676,7 +676,7 @@ txa_service_func(void *args)
>                 RTE_ETH_FOREACH_DEV(i) {
>                         uint16_t q;
>
> -                       if (i == txa->dev_count)
> +                       if (i >= txa->dev_count)
>                                 break;
>
>                         dev = tdi[i].dev;
> --
> 2.25.1
>

      reply	other threads:[~2023-01-17 16:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07 16:40 Naga Harish K S V
2023-01-17 16:00 ` Jerin Jacob [this message]

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=CALBAE1Pq2oLJj2T6pLpJTWhtU-Rz4OpV3PVdycq20M585Ur3Gg@mail.gmail.com \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=jay.jayatheerthan@intel.com \
    --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).