patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: "Joyce Kong" <joyce.kong@arm.com>,
	"Jakub Grajciar" <jgrajcia@cisco.com>,
	"Morten Brørup" <mb@smartsharesystems.com>,
	"Ruifeng Wang" <ruifeng.wang@arm.com>
Cc: dev@dpdk.org, nd@arm.com, stable@dpdk.org,
	Feifei Wang <feifei.wang2@arm.com>
Subject: Re: [PATCH v1] net/memif: fix segfault with large burst size
Date: Wed, 27 Sep 2023 17:37:49 +0100	[thread overview]
Message-ID: <67602903-563a-440c-87fa-182b056a177b@amd.com> (raw)
In-Reply-To: <20230904071041.3403495-1-joyce.kong@arm.com>

On 9/4/2023 8:10 AM, Joyce Kong wrote:
> There will be a segfault when Rx burst size is greater than
> MAX_PKT_BURST of memif. Fix the issue by correcting the
> wrong mbuf index in eth_memif_rx, which results in accessing
> invalid memory address.
> 
> Bugzilla ID: 1273
> Fixes: aa17df860891 ("net/memif: add a Rx fast path")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> Reviewed-by: Feifei Wang <feifei.wang2@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
>  drivers/net/memif/rte_eth_memif.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
> index 6a8ff5b4eb..f595656af5 100644
> --- a/drivers/net/memif/rte_eth_memif.c
> +++ b/drivers/net/memif/rte_eth_memif.c
> @@ -356,7 +356,7 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
>  		rx_pkts = 0;
>  		pkts = nb_pkts < MAX_PKT_BURST ? nb_pkts : MAX_PKT_BURST;
>  		while (n_slots && rx_pkts < pkts) {
> -			mbuf_head = mbufs[n_rx_pkts];
> +			mbuf_head = mbufs[rx_pkts];
>  			mbuf = mbuf_head;
>  
>  next_slot1:

Hi Jakub,

Can you please look at this patch?

Thanks,
ferruh

  reply	other threads:[~2023-09-27 16:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04  7:10 Joyce Kong
2023-09-27 16:37 ` Ferruh Yigit [this message]
2023-09-29 14:41 ` Ferruh Yigit

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=67602903-563a-440c-87fa-182b056a177b@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=dev@dpdk.org \
    --cc=feifei.wang2@arm.com \
    --cc=jgrajcia@cisco.com \
    --cc=joyce.kong@arm.com \
    --cc=mb@smartsharesystems.com \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@arm.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).