From: Leo Yan <leo.yan@arm.com>
To: Sean Anderson <sean.anderson@linux.dev>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
Yeoreum Yun <yeoreum.yun@arm.com>,
Linu Cherian <lcherian@marvell.com>,
Mike Leach <mike.leach@linaro.org>,
linux-kernel@vger.kernel.org,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
James Clark <james.clark@linaro.org>
Subject: Re: [PATCH v5 3/3] coresight: Fix possible deadlock in coresight_panic_cb
Date: Thu, 25 Sep 2025 17:22:52 +0100 [thread overview]
Message-ID: <20250925162252.GE7985@e132581.arm.com> (raw)
In-Reply-To: <20250925150342.1845615-4-sean.anderson@linux.dev>
On Thu, Sep 25, 2025 at 11:03:42AM -0400, Sean Anderson wrote:
> Panics can occur at any time, so taking locks may cause a deadlock (such
> as if the panicking CPU held the lock). coresight_panic_cb uses
> bus_for_each_dev, but that calls bus_to_subsys which takes
> bus_kset->list_lock.
>
> Instead of registering a single panic notifier and iterating over
> coresight devices, register a panic notifier for each coresight device
> that requires it (letting the atomic notifier list handle iteration).
> atomic_notifier_chain_unregister will just return -ENOENT if a notifier
> block isn't on the list, so it's safe to call when we haven't registered
> a notifier.
>
> Fixes: 46006ceb5d02 ("coresight: core: Add provision for panic callbacks")
> Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Reviewed-by: Leo Yan <leo.yan@arm.com>
prev parent reply other threads:[~2025-09-25 16:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-25 15:03 [PATCH v5 0/3] coresight: Fix possible deadlock in coresight_panic_cb Sean Anderson
2025-09-25 15:03 ` [PATCH v5 1/3] coresight: Fix fwnode leak in coresight_register error path Sean Anderson
2025-09-26 10:16 ` Mike Leach
2025-09-25 15:03 ` [PATCH v5 2/3] coresight: Reorder coresight_device_release to match coresight_register Sean Anderson
2025-09-26 10:21 ` Mike Leach
2025-09-25 15:03 ` [PATCH v5 3/3] coresight: Fix possible deadlock in coresight_panic_cb Sean Anderson
2025-09-25 16:22 ` Leo Yan [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=20250925162252.GE7985@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=james.clark@linaro.org \
--cc=lcherian@marvell.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.leach@linaro.org \
--cc=sean.anderson@linux.dev \
--cc=suzuki.poulose@arm.com \
--cc=yeoreum.yun@arm.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