From: Jiangtian Feng <jiangtianfeng@linux.alibaba.com>
To: andre.przywara@arm.com
Cc: mark.rutland@arm.com, lpieralisi@kernel.org,
sudeep.holla@kernel.org, salman.nabi@arm.com,
vvidwans@nvidia.com, nirmoyd@nvidia.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Jiangtian Feng <jiangtianfeng@linux.alibaba.com>
Subject: [PATCH 2/4] firmware: smccc: lfa: Drop nested CPU hotplug read lock
Date: Thu, 3 Dec 2026 09:38:15 +0800 [thread overview]
Message-ID: <20261203013817.1215179-3-jiangtianfeng@linux.alibaba.com> (raw)
In-Reply-To: <20261203013817.1215179-1-jiangtianfeng@linux.alibaba.com>
stop_machine() already takes cpus_read_lock() internally. Taking another
read lock outside can deadlock if a hotplug writer starts waiting
between the two acquisitions.
Call stop_machine() directly and let it manage the hotplug lock.
Link: https://lore.kernel.org/all/705b63c3-297a-4bf8-9eb2-b826e280e7da@nvidia.com/
Signed-off-by: Jiangtian Feng <jiangtianfeng@linux.alibaba.com>
---
drivers/firmware/smccc/lfa_fw.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/firmware/smccc/lfa_fw.c b/drivers/firmware/smccc/lfa_fw.c
index 383157ab7cea..1864176f3410 100644
--- a/drivers/firmware/smccc/lfa_fw.c
+++ b/drivers/firmware/smccc/lfa_fw.c
@@ -460,10 +460,8 @@ static int activate_fw_component(struct fw_component *comp)
comp->use_cpu_rendezvous = comp->cpu_rendezvous_forced ||
comp->cpu_rendezvous;
if (comp->use_cpu_rendezvous) {
- cpus_read_lock();
ret = stop_machine(call_lfa_activate, comp,
cpu_online_mask);
- cpus_read_unlock();
} else {
ret = call_lfa_activate(comp);
}
--
2.47.3
next prev parent reply other threads:[~2026-12-03 1:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 16:54 [PATCH v5 RESEND 0/6] Arm Live Firmware Activation (LFA) support Andre Przywara
2026-11-02 16:54 ` [PATCH v5 RESEND 1/6] dt-bindings: arm: Add Live Firmware Activation Andre Przywara
2026-11-02 16:54 ` [PATCH v5 RESEND 2/6] firmware: smccc: Add support for Live Firmware Activation (LFA) Andre Przywara
2026-11-04 22:50 ` Vedashree Vidwans
2026-11-02 16:54 ` [PATCH v5 RESEND 3/6] firmware: smccc: lfa: Register ACPI notification Andre Przywara
2026-11-04 20:03 ` Nirmoy Das
2026-11-04 23:02 ` Vedashree Vidwans
2026-11-02 16:54 ` [PATCH v5 RESEND 4/6] firmware: smccc: lfa: Add auto_activate sysfs file Andre Przywara
2026-11-02 16:54 ` [PATCH v5 RESEND 5/6] firmware: smccc: lfa: Register DT interrupt Andre Przywara
2026-11-03 4:20 ` kernel test robot
2026-11-03 7:50 ` kernel test robot
2026-11-03 9:25 ` kernel test robot
2026-11-02 16:54 ` [PATCH v5 RESEND 6/6] firmware: smccc: lfa: add sysfs ABI documentation Andre Przywara
2026-11-05 9:17 ` [PATCH v5 RESEND 0/6] Arm Live Firmware Activation (LFA) support Nirmoy Das
2026-12-03 1:38 ` [PATCH 0/4] firmware: smccc: lfa: Fix deterministic v5 issues Jiangtian Feng
2026-12-03 1:38 ` [PATCH 1/4] firmware: smccc: lfa: Stop PRIME retry after completion Jiangtian Feng
2026-12-03 5:56 ` [PATCH] firmware: smccc: lfa: Cancel PRIME after a partial failure Jiangtian Feng
2026-12-03 1:38 ` Jiangtian Feng [this message]
2026-12-03 1:38 ` [PATCH 3/4] firmware: smccc: lfa: Fix probe and notification rollback Jiangtian Feng
2026-12-03 1:38 ` [PATCH 4/4] firmware: smccc: lfa: Close DT IRQ mapping lifetime Jiangtian Feng
2026-12-03 9:34 ` [RFC] firmware: smccc: lfa: Inventory and notification failure recovery Jiangtian Feng
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=20261203013817.1215179-3-jiangtianfeng@linux.alibaba.com \
--to=jiangtianfeng@linux.alibaba.com \
--cc=andre.przywara@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mark.rutland@arm.com \
--cc=nirmoyd@nvidia.com \
--cc=salman.nabi@arm.com \
--cc=sudeep.holla@kernel.org \
--cc=vvidwans@nvidia.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
all inboxes | Powered by JetHome®