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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAO9wTFgYMfDzmL_PfpX4jRKaG2mEZmNq+rLRyprGLN6r23udkQ@mail.gmail.com>
Date: Tue, 22 Jul 2025 22:15:22 +0530
From: Suchit K <suchitkarunakaran@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com, horms@...nel.org, 
	jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us, sdf@...ichev.me, 
	kuniyu@...gle.com, aleksander.lobakin@...el.com, netdev@...r.kernel.org, 
	skhan@...uxfoundation.org, linux-kernel-mentees@...ts.linux.dev, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: Revert tx queue length on partial failure in dev_qdisc_change_tx_queue_len()

On Tue, 22 Jul 2025 at 21:58, Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Tue, Jul 22, 2025 at 9:22 AM Suchit K <suchitkarunakaran@...il.com> wrote:
> >
> > >
> > > WRITE_ONCE() is missing.
> >
> > Oops, I'm sorry about that.
> >
> > >
> > > > +               while (i >= 0) {
> > > > +                       qdisc_change_tx_queue_len(dev, &dev->_tx[i]);
> > >
> > > What happens if one of these calls fails ?
> > >
> > > I think a fix will be more complicated...
> >
> > I did consider that, but since I didn’t have a solution, I assumed it
> > wouldn’t fail.
>
> But this definitely could fail. Exactly the same way than the first time.
>

Yeah, it makes sense.

> I also have a question. In the Qdisc_ops structure,
> > there’s a function pointer for change_tx_queue_len, but I was only
> > able to find a single implementation which is
> > pfifo_fast_change_tx_queue_len. Is that the only one? Apologies if
> > this isn’t the right place to ask such questions. I’d really
> > appreciate any feedback. Thank you!
>
> I think only pfifo_fast has to re-allocate its data structures.
>
> Other qdiscs eventually dynamically read dev->tx_queue_len (thus the
> WRITE_ONCE() I mentioned to you)

Yup got it. Thank you so much.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ