From: Cong Wang <xiyou.wangcong@gmail.com>
To: Xiang Mei <xmei5@asu.edu>
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 14:29:04 -0700 [thread overview]
Message-ID: <aHAwoPHQQJvxSiNB@pop-os.localdomain> (raw)
In-Reply-To: <20250710100942.1274194-1-xmei5@asu.edu>
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.
next prev parent reply other threads:[~2025-07-10 21:29 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 [this message]
2025-07-10 22:38 ` Xiang Mei
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=aHAwoPHQQJvxSiNB@pop-os.localdomain \
--to=xiyou.wangcong@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=security@kernel.org \
--cc=xmei5@asu.edu \
/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).