lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACKFLin=wwXvduQ=od_BZxMDOhc1uHCTmwg6FcpoLtHKBjOHyA@mail.gmail.com>
Date: Thu, 27 Jun 2024 17:39:16 -0700
From: Michael Chan <michael.chan@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com, 
	pabeni@...hat.com, pavan.chebbi@...adcom.com, andrew.gospodarek@...adcom.com, 
	richardcochran@...il.com
Subject: Re: [PATCH net-next 02/10] bnxt_en: Add is_ts_pkt field to struct bnxt_sw_tx_bd

On Thu, Jun 27, 2024 at 5:08 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Wed, 26 Jun 2024 09:42:59 -0700 Michael Chan wrote:
> > @@ -612,9 +613,11 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
> >  normal_tx:
> >       if (length < BNXT_MIN_PKT_SIZE) {
> >               pad = BNXT_MIN_PKT_SIZE - length;
> > -             if (skb_pad(skb, pad))
> > +             if (skb_pad(skb, pad)) {
> >                       /* SKB already freed. */
> > +                     tx_buf->is_ts_pkt = 0;
> >                       goto tx_kick_pending;
> > +             }
> >               length = BNXT_MIN_PKT_SIZE;
> >       }
>
> There is a jump to tx_free in between these two, when DMA mapping
> head fails. It appears not to clear is_ts_pkt.
>

You are absolutely right.

> Why not add the clearing above the line on the error patch which
> clears the skb pointer?

Yes, that looks like the best place to clear it for all error
conditions.  I think I will consolidate all the PTP cleanup around
that location to make the code look cleaner.  Thanks.

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ