Hi Mohamed & Sebastian,
On Fri, Jul 17, 2026 at 10:14:53AM +0200, Sebastian Andrzej Siewior wrote:
[...]
There is coresight_put_percpu_source_ref() with holds coresight_dev_lock during a put_cpu. I don't know why the lock is held, it is not obvious to me. But it will lead to a similar problem if the put actually invokes the release callback.
Sorry I am a bit late to join the discussion.
Essentially, this is about how to manage a module's lifetime correctly so that the CPU PM notifier can safely access a device. There is an edge case where the CPU PM notifier is accessing the device while, at the same time, the module is being unloaded and the device's resources are being released.
For now, I'd suggest please hold on this patch. Give me a bit time to study this thread, I will share back more details.
Thanks, Leo