mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: "Paul Barker" <paul.barker.ct@bp.renesas.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>
Cc: <netdev@vger.kernel.org>, <linux-renesas-soc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net 4/4] net: ravb: Fix RX byte accounting for jumbo packets
Date: Thu, 11 Apr 2024 20:56:08 +0300	[thread overview]
Message-ID: <bdaf93f3-099a-8f4a-4db1-53293f6fb9d6@omp.ru> (raw)
In-Reply-To: <20240411114434.26186-5-paul.barker.ct@bp.renesas.com>

On 4/11/24 2:44 PM, Paul Barker wrote:

> The RX byte accounting for jumbo packets was changed to fix a potential
> use-after-free bug. However, that fix used the wrong variable and so
> only accounted for the number of bytes in the final descriptor, not the
> number of bytes in the whole packet.
> 
> To fix this, we can simply update our stats with the correct number of
> bytes before calling napi_gro_receive().
> 
> Also rename pkt_len to desc_len in ravb_rx_gbeth() to avoid any future
> confusion. The variable name pkt_len is correct in ravb_rx_rcar() as
> that function does not handle packets spanning multiple descriptors.
> 
> Fixes: 5a5a3e564de6 ("ravb: Fix potential use-after-free in ravb_rx_gbeth()")
> Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>

Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>

[...]

MBR, Sergey

      reply	other threads:[~2024-04-11 17:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11 11:44 [PATCH net 0/4] ravb Ethernet driver bugfixes Paul Barker
2024-04-11 11:44 ` [PATCH net 1/4] net: ravb: Count packets instead of descriptors in R-Car RX path Paul Barker
2024-04-11 16:23   ` Sergey Shtylyov
2024-04-14 12:08   ` Niklas Söderlund
2024-04-15  7:04     ` Paul Barker
2024-04-15  9:44       ` Niklas Söderlund
2024-04-11 11:44 ` [PATCH net 2/4] net: ravb: Allow RX loop to move past DMA mapping errors Paul Barker
2024-04-11 16:37   ` Sergey Shtylyov
2024-04-14 12:17   ` Niklas Söderlund
2024-04-15  7:12     ` Paul Barker
2024-04-15  9:52       ` Niklas Söderlund
2024-04-11 11:44 ` [PATCH net 3/4] net: ravb: Fix GbEth jumbo packet RX checksum handling Paul Barker
2024-04-11 16:50   ` Sergey Shtylyov
2024-04-11 11:44 ` [PATCH net 4/4] net: ravb: Fix RX byte accounting for jumbo packets Paul Barker
2024-04-11 17:56   ` Sergey Shtylyov [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=bdaf93f3-099a-8f4a-4db1-53293f6fb9d6@omp.ru \
    --to=s.shtylyov@omp.ru \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=geert+renesas@glider.be \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=pabeni@redhat.com \
    --cc=paul.barker.ct@bp.renesas.com \
    /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

all inboxes | Powered by JetHome®