Re: [PATCH 0/3] hwmon: (occ) Fix bugs in power sensor, extended sensor, and remove path
From: Guenter Roeck
Date: Mon Mar 30 2026 - 14:43:30 EST
On 3/30/26 09:01, Pradhan, Sanman wrote:
From: Sanman Pradhan <psanman@xxxxxxxxxxx>
Thanks, for the review.
The AI feedback seems valid on both counts, but both issues appear to be
pre-existing OCC driver problems rather than something introduced by my
patch.
occ_shutdown() already holds occ->lock across
occ_shutdown_sysfs() and hwmon_device_unregister(), while OCC sysfs
callbacks can enter occ_active() / occ_update_response() and take
the same lock, so the deadlock concern looks real independent of my
reorder in p9_sbe_occ_remove().
Also, the occ_active toggle path appears to have a lifetime problem:
activation allocates occ->attrs and occ->group.attrs with
devm_kcalloc(), while deactivation unregisters the hwmon device but
does not release or reuse those allocations.
Given that, I'll drop patch 3 for now and resend patches 1 and 2
separately, then investigate the OCC teardown/activation issues.
Do you plan to make any changes to patch 1 and 2 ? Because if not there
would be no need to resend, and I can just apply them directly.
Thanks,
Guenter