public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Xiang Mei <xmei5@asu.edu>
Cc: dan.carpenter@linaro.org, netdev@vger.kernel.org
Subject: Re: [PATCH v1] net/sched: sch_qfq: Avoid triggering might_sleep in atomic context in qfq_delete_class
Date: Fri, 18 Jul 2025 11:48:52 -0700	[thread overview]
Message-ID: <aHqXFDrL/r2UWWCP@pop-os.localdomain> (raw)
In-Reply-To: <20250717230128.159766-1-xmei5@asu.edu>

On Thu, Jul 17, 2025 at 04:01:28PM -0700, Xiang Mei wrote:
> might_sleep could be trigger in the atomic context in qfq_delete_class.
> 
> qfq_destroy_class was moved into atomic context locked
> by sch_tree_lock to avoid a race condition bug on
> qfq_aggregate. However, might_sleep could be triggered by
> qfq_destroy_class, which introduced sleeping in atomic context (path:
> qfq_destroy_class->qdisc_put->__qdisc_destroy->lockdep_unregister_key
> ->might_sleep).
> 
> Considering the race is on the qfq_aggregate objects, keeping
> qfq_rm_from_agg in the lock but moving the left part out can solve
> this issue.
> 
> Fixes: 5e28d5a3f774 ("net/sched: sch_qfq: Fix race condition on qfq_aggregate")
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Signed-off-by: Xiang Mei <xmei5@asu.edu>
> Link: https://patch.msgid.link/4a04e0cc-a64b-44e7-9213-2880ed641d77@sabinyo.mountain

Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>

Thanks for the quick fix!

  reply	other threads:[~2025-07-18 18:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-17 23:01 [PATCH v1] net/sched: sch_qfq: Avoid triggering might_sleep in atomic context in qfq_delete_class Xiang Mei
2025-07-18 18:48 ` Cong Wang [this message]
2025-07-18 19:43 ` Dan Carpenter
2025-07-18 21:11   ` Xiang Mei
2025-07-22 10: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=aHqXFDrL/r2UWWCP@pop-os.localdomain \
    --to=xiyou.wangcong@gmail.com \
    --cc=dan.carpenter@linaro.org \
    --cc=netdev@vger.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