From: Markus Elfring <Markus.Elfring@web.de>
To: Gui-Dong Han <hanguidong02@gmail.com>,
linux-pm@vger.kernel.org, Danilo Krummrich <dakr@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Len Brown <lenb@kernel.org>, Pavel Machek <pavel@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Jia-Ju Bai <baijiaju1990@gmail.com>
Subject: Re: [PATCH] PM: sleep: wakeirq: harden dev_pm_clear_wake_irq() against races
Date: Mon, 2 Feb 2026 17:15:29 +0100 [thread overview]
Message-ID: <b5f78443-0277-4366-8e01-ff9a430d5282@web.de> (raw)
In-Reply-To: <20260131101254.56423-1-hanguidong02@gmail.com>
…
> Address this by using double-checked locking. This retains the
> performance benefit of avoiding the lock when dev->power.wakeirq is
> NULL, consistent with the original logic, but adds a necessary re-check
> after acquiring dev->power.lock. Additionally, use READ_ONCE() and
> WRITE_ONCE() to annotate the shared variable accesses to avoid data races
> as defined by the kernel documentation.
…
How do you think about to apply lock guards in the affected function implementations?
Regards,
Markus
next prev parent reply other threads:[~2026-02-02 16:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-31 10:12 Gui-Dong Han
2026-02-02 16:15 ` Markus Elfring [this message]
2026-02-02 20:55 ` Rafael J. Wysocki
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=b5f78443-0277-4366-8e01-ff9a430d5282@web.de \
--to=markus.elfring@web.de \
--cc=baijiaju1990@gmail.com \
--cc=dakr@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hanguidong02@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
/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
all inboxes | Powered by JetHome®