From: Simon Horman <horms@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>,
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 17:04:49 +0100 [thread overview]
Message-ID: <20250311160449.GP4159220@kernel.org> (raw)
In-Reply-To: <17414eab-445d-4669-89a9-855a872f7c16@redhat.com>
On Tue, Mar 11, 2025 at 01:47:32PM +0100, Paolo Abeni wrote:
>
>
> On 3/11/25 11:48 AM, Simon Horman wrote:
> > 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?`
> >
> > ...
>
> Should be:
>
> Fixes: 066a3b5b2346 ("[NET_SCHED] sch_api: fix
> qdisc_tree_decrease_qlen() loop")
Thanks.
Looking at that, I might have gone for the following commit,
which is a fix for the above one. But either way is fine by me.
commit 2e95c4384438 ("net/sched: stop qdisc_tree_reduce_backlog on TC_H_ROOT")
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2025-03-11 16:04 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
2025-03-11 12:47 ` Paolo Abeni
2025-03-11 16:04 ` Simon Horman [this message]
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=20250311160449.GP4159220@kernel.org \
--to=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=mincho@theori.io \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.