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: <CACKFLimoVkYG24yJPK6cTRhGGoF6eR8g=Pu__Qf1j00usEXb6w@mail.gmail.com>
Date: Mon, 21 Apr 2025 10:35:26 -0700
From: Michael Chan <michael.chan@...adcom.com>
To: Pavan Chebbi <pavan.chebbi@...adcom.com>
Cc: Vadim Fedorenko <vadfed@...a.com>, Jakub Kicinski <kuba@...nel.org>, 
	Vadim Fedorenko <vadim.fedorenko@...ux.dev>, Richard Cochran <richardcochran@...il.com>, 
	netdev@...r.kernel.org
Subject: Re: [PATCH net v2] bnxt_en: improve TX timestamping FIFO configuration

On Mon, Apr 21, 2025 at 2:39 AM Pavan Chebbi <pavan.chebbi@...adcom.com> wrote:
>
> On Thu, Apr 17, 2025 at 9:31 PM Vadim Fedorenko <vadfed@...a.com> wrote:
> >
> > +void bnxt_ptp_free_txts_skbs(struct bnxt_ptp_cfg *ptp)
> > +{
> > +       struct bnxt_ptp_tx_req *txts_req;
> > +       u16 cons = ptp->txts_cons;
> > +
> > +       /* make sure ptp aux worker finished with
> > +        * possible BNXT_STATE_OPEN set
> > +        */
> > +       ptp_cancel_worker_sync(ptp->ptp_clock);
> > +
> > +       ptp->tx_avail = BNXT_MAX_TX_TS;
> > +       while (cons != ptp->txts_prod) {
> > +               txts_req = &ptp->txts_req[cons];
> > +               if (!IS_ERR_OR_NULL(txts_req->tx_skb))
> > +                       dev_kfree_skb_any(txts_req->tx_skb);
>
> For completeness, should we not set txts_req->tx_skb = NULL here, just
> like we did in bnxt_ptp_clear which is now gone.

I agree it is better to set it to NULL so we don't keep a dangling
pointer in the array.  But I think it is not strictly necessary
because only the entries between cons and prod are valid.  This loop
will advance cons to prod.

>
> > +               cons = NEXT_TXTS(cons);
> > +       }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ