From: Tejun Heo <tj@kernel.org>
To: Alice Ryhl <aliceryhl@google.com>
Cc: "Lai Jiangshan" <jiangshanlai@gmail.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Boqun Feng" <boqun@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Danilo Krummrich" <dakr@kernel.org>,
"Philipp Stanner" <phasta@kernel.org>,
"Matthew Brost" <matthew.brost@intel.com>,
"Christian König" <ckoenig.leichtzumerken@gmail.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Boris Brezillon" <boris.brezillon@collabora.com>,
"Steven Price" <steven.price@arm.com>,
"Liviu Dudau" <liviu.dudau@arm.com>,
"Onur Özkan" <work@onurozkan.dev>,
dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 1/2] workqueue: fix cancel_work_sync() on ordered workqueues
Date: Tue, 24 Nov 2026 14:29:25 -1000 [thread overview]
Message-ID: <2efd4eef27cbd033bae9e4f5d5ba30bb@kernel.org> (raw)
In-Reply-To: <20261118-ordered-wq-cancel-v1-1-916e01f9affe@google.com>
Hello, Alice.
On Wed, Nov 18, 2026 at 05:09:51PM +0000, Alice Ryhl wrote:
> + if (unlikely(pwq->wq->flags & __WQ_ORDERED)) {
> + struct pool_workqueue *oldest_pwq =
> + list_first_or_null_rcu(&pwq->wq->pwqs,
> + struct pool_workqueue,
> + pwqs_node);
> +
> + if (oldest_pwq)
> + offq_pool = oldest_pwq->pool;
> + }
@pwq still has @work queued on it here, so it's linked on wq->pwqs and the
list can't be empty. Maybe drop the NULL check? e.g.
if (unlikely(pwq->wq->flags & __WQ_ORDERED))
offq_pool = list_entry_rcu(pwq->wq->pwqs.next, struct pool_workqueue,
pwqs_node)->pool;
Thanks.
--
tejun
next prev parent reply other threads:[~2026-11-25 0:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 17:09 [PATCH 0/2] workqueue: fix cancel_work_sync() on ordered workqueues and clarify docs Alice Ryhl
2026-11-18 17:09 ` [PATCH 1/2] workqueue: fix cancel_work_sync() on ordered workqueues Alice Ryhl
2026-11-25 0:29 ` Tejun Heo [this message]
2026-11-18 17:09 ` [PATCH 2/2] workqueue: doc: clarify cancel_work_sync() cross-workqueue behavior Alice Ryhl
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=2efd4eef27cbd033bae9e4f5d5ba30bb@kernel.org \
--to=tj@kernel.org \
--cc=aliceryhl@google.com \
--cc=boqun@kernel.org \
--cc=boris.brezillon@collabora.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=corbet@lwn.net \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jiangshanlai@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=matthew.brost@intel.com \
--cc=ojeda@kernel.org \
--cc=phasta@kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=steven.price@arm.com \
--cc=thomas.hellstrom@linux.intel.com \
--cc=work@onurozkan.dev \
/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