[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aHBA6kAmizjIL1B5@xps>
Date: Thu, 10 Jul 2025 15:38:34 -0700
From: Xiang Mei <xmei5@....edu>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: netdev@...r.kernel.org, gregkh@...uxfoundation.org, jhs@...atatu.com,
jiri@...nulli.us, security@...nel.org
Subject: Re: [PATCH v3] net/sched: sch_qfq: Fix race condition on
qfq_aggregate
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@....edu>
>
> Reviewed-by: Cong Wang <xiyou.wangcong@...il.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.
Powered by blists - more mailing lists