netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com, jiri@resnulli.us,
	mincho@theori.io
Subject: Re: [Patch net 1/2] net_sched: Prevent creation of classes with TC_H_ROOT
Date: Tue, 11 Mar 2025 11:48:35 +0100	[thread overview]
Message-ID: <20250311104835.GJ4159220@kernel.org> (raw)
In-Reply-To: <20250306232355.93864-2-xiyou.wangcong@gmail.com>

On Thu, Mar 06, 2025 at 03:23:54PM -0800, Cong Wang wrote:
> The function qdisc_tree_reduce_backlog() uses TC_H_ROOT as a termination
> condition when traversing up the qdisc tree to update parent backlog
> counters. However, if a class is created with classid TC_H_ROOT, the
> traversal terminates prematurely at this class instead of reaching the
> actual root qdisc, causing parent statistics to be incorrectly maintained.
> In case of DRR, this could lead to a crash as reported by Mingi Cho.
> 
> Prevent the creation of any Qdisc class with classid TC_H_ROOT
> (0xFFFFFFFF) across all qdisc types, as suggested by Jamal.
> 
> Reported-by: Mingi Cho <mincho@theori.io>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

Hi Cong,

This change looks good to me.
But could we get a fixes tag?`

...

  reply	other threads:[~2025-03-11 10:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06 23:23 [Patch net 0/2] net_sched: Prevent creation of classes with TC_H_ROOT Cong Wang
2025-03-06 23:23 ` [Patch net 1/2] " Cong Wang
2025-03-11 10:48   ` Simon Horman [this message]
2025-03-11 12:47     ` Paolo Abeni
2025-03-11 16:04       ` Simon Horman
2025-03-11 20:07         ` Cong Wang
2025-03-06 23:23 ` [Patch net 2/2] selftests/tc-testing: Add a test case for DRR class " Cong Wang
2025-03-11 16:05   ` Simon Horman
2025-03-12 20:10 ` [Patch net 0/2] net_sched: Prevent creation of classes " 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=20250311104835.GJ4159220@kernel.org \
    --to=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=mincho@theori.io \
    --cc=netdev@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).