From: Xiang Mei <xmei5@asu.edu>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: netdev@vger.kernel.org, gregkh@linuxfoundation.org,
jhs@mojatatu.com, jiri@resnulli.us, security@kernel.org
Subject: Re: [PATCH v3] net/sched: sch_qfq: Fix race condition on qfq_aggregate
Date: Thu, 10 Jul 2025 15:38:34 -0700 [thread overview]
Message-ID: <aHBA6kAmizjIL1B5@xps> (raw)
In-Reply-To: <aHAwoPHQQJvxSiNB@pop-os.localdomain>
On Thu, Jul 10, 2025 at 02:29:04PM -0700, Cong Wang wrote:
> On Thu, Jul 10, 2025 at 03:09:42AM -0700, Xiang Mei wrote:
> > A race condition can occur when 'agg' is modified in qfq_change_agg
> > (called during qfq_enqueue) while other threads access it
> > concurrently. For example, qfq_dump_class may trigger a NULL
> > dereference, and qfq_delete_class may cause a use-after-free.
> >
> > This patch addresses the issue by:
> >
> > 1. Moved qfq_destroy_class into the critical section.
> >
> > 2. Added sch_tree_lock protection to qfq_dump_class and
> > qfq_dump_class_stats.
> >
> > Fixes: 462dbc9101ac ("pkt_sched: QFQ Plus: fair-queueing service at DRR cost")
> > Signed-off-by: Xiang Mei <xmei5@asu.edu>
>
> Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
>
> I am looking forward to your net-next patch to make it towards RCU. :)
>
> Thanks.
Thanks so much for your help. I’ve learned a lot from you and the Linux
kernel community.
I'll work on deliever an better patch after triage the left crashes.
next prev parent reply other threads:[~2025-07-10 22:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 10:09 [PATCH v3] net/sched: sch_qfq: Fix race condition on qfq_aggregate Xiang Mei
2025-07-10 21:29 ` Cong Wang
2025-07-10 22:38 ` Xiang Mei [this message]
2025-07-13 21:31 ` Cong Wang
2025-07-13 21:34 ` Xiang Mei
2025-07-14 0:04 ` Xiang Mei
2025-07-14 22:32 ` Jakub Kicinski
2025-07-15 0:09 ` Xiang Mei
2025-07-15 17:23 ` Cong Wang
2025-07-15 18:13 ` Cong Wang
2025-07-15 22:16 ` Xiang Mei
2025-07-12 23: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=aHBA6kAmizjIL1B5@xps \
--to=xmei5@asu.edu \
--cc=gregkh@linuxfoundation.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=security@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