From: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
To: CHAMPSEIX Thomas <thomas.champseix@alstomgroup.com>,
Marco Crivellari <marco.crivellari@suse.com>,
Kees Cook <kees@kernel.org>, Roy Pledge <roy.pledge@nxp.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Scott Wood <oss@buserror.net>,
Richard Genoud <richard.genoud@bootlin.com>
Cc: Christophe Leroy <chleroy@kernel.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: fsl: qbman: fix race condition in qman_destroy_fq
Date: Fri, 6 Feb 2026 08:24:38 +0100 [thread overview]
Message-ID: <177036249397.3323736.12618812589949729211.b4-ty@kernel.org> (raw)
In-Reply-To: <20251223072549.397625-1-richard.genoud@bootlin.com>
On Tue, 23 Dec 2025 08:25:49 +0100, Richard Genoud wrote:
> When QMAN_FQ_FLAG_DYNAMIC_FQID is set, there's a race condition between
> fq_table[fq->idx] state and freeing/allocating from the pool and
> WARN_ON(fq_table[fq->idx]) in qman_create_fq() gets triggered.
>
> Indeed, we can have:
> Thread A Thread B
> qman_destroy_fq() qman_create_fq()
> qman_release_fqid()
> qman_shutdown_fq()
> gen_pool_free()
> -- At this point, the fqid is available again --
> qman_alloc_fqid()
> -- so, we can get the just-freed fqid in thread B --
> fq->fqid = fqid;
> fq->idx = fqid * 2;
> WARN_ON(fq_table[fq->idx]);
> fq_table[fq->idx] = fq;
> fq_table[fq->idx] = NULL;
>
> [...]
Applied, thanks!
[1/1] soc: fsl: qbman: fix race condition in qman_destroy_fq
(no commit info)
Best regards,
--
Christophe Leroy (CS GROUP) <chleroy@kernel.org>
prev parent reply other threads:[~2026-02-06 7:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-23 7:25 [PATCH] soc: fsl: qbman: fix race condition in qman_destroy_fq Richard Genoud
2026-01-06 18:29 ` Christophe Leroy (CS GROUP)
2026-01-07 9:03 ` Richard GENOUD
2026-02-02 12:54 ` Richard GENOUD
2026-02-06 7:16 ` Christophe Leroy (CS GROUP)
2026-02-06 7:24 ` Christophe Leroy (CS GROUP) [this message]
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=177036249397.3323736.12618812589949729211.b4-ty@kernel.org \
--to=chleroy@kernel.org \
--cc=claudiu.manoil@nxp.com \
--cc=kees@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=marco.crivellari@suse.com \
--cc=oss@buserror.net \
--cc=richard.genoud@bootlin.com \
--cc=roy.pledge@nxp.com \
--cc=thomas.champseix@alstomgroup.com \
--cc=thomas.petazzoni@bootlin.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