public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia.com>
To: Davide Caratti <dcaratti@redhat.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Petr Machata <petrm@mellanox.com>,
	Ido Schimmel <idosch@mellanox.com>, <netdev@vger.kernel.org>
Subject: Re: [PATCH net] net/sched: ets: fix divide by zero in the offload path
Date: Wed, 25 Feb 2026 18:23:13 +0100	[thread overview]
Message-ID: <87tsv4g2jk.fsf@nvidia.com> (raw)
In-Reply-To: <28504887df314588c7255e9911769c36f751edee.1771964872.git.dcaratti@redhat.com>


Davide Caratti <dcaratti@redhat.com> writes:

> Offloading ETS requires computing each class' WRR weight: this is done by
> averaging over the sums of quanta as 'q_sum' and 'q_psum'. Using unsigned
> int, the same integer size as the individual DRR quanta, can overflow and
> even cause division by zero, like it happened in the following splat:

...

> Fix this using 64-bit integers for 'q_sum' and 'q_psum'.
>
> Cc: stable@vger.kernel.org
> Fixes: d35eb52bd2ac ("net: sch_ets: Make the ETS qdisc offloadable")
> Signed-off-by: Davide Caratti <dcaratti@redhat.com>

Thanks for the fix!

Reviewed-by: Petr Machata <petrm@nvidia.com>

  parent reply	other threads:[~2026-02-25 17:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24 20:28 [PATCH net] net/sched: ets: fix divide by zero in the offload path Davide Caratti
2026-02-25 13:45 ` Jamal Hadi Salim
2026-02-25 14:04   ` Davide Caratti
2026-02-25 17:37     ` Jamal Hadi Salim
2026-02-25 17:23 ` Petr Machata [this message]
2026-02-27  3:20 ` patchwork-bot+netdevbpf

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=87tsv4g2jk.fsf@nvidia.com \
    --to=petrm@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=idosch@mellanox.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@mellanox.com \
    --cc=xiyou.wangcong@gmail.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