From: Naga Harish K S V <s.v.naga.harish.k@intel.com>
To: jerinj@marvell.com
Cc: dev@dpdk.org, jay.jayatheerthan@intel.com, stable@dpdk.org
Subject: [PATCH] eventdev/eth_tx: fix service function
Date: Sat, 7 Jan 2023 10:40:58 -0600 [thread overview]
Message-ID: <20230107164058.3709813-1-s.v.naga.harish.k@intel.com> (raw)
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
next reply other threads:[~2023-01-07 16:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-07 16:40 Naga Harish K S V [this message]
2023-01-17 16:00 ` 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=20230107164058.3709813-1-s.v.naga.harish.k@intel.com \
--to=s.v.naga.harish.k@intel.com \
--cc=dev@dpdk.org \
--cc=jay.jayatheerthan@intel.com \
--cc=jerinj@marvell.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).