Guenter Roeck
754bd2b4a0
hwmon: (pmbus/core) Protect regulator operations with mutex
...
The regulator operations pmbus_regulator_get_voltage(),
pmbus_regulator_set_voltage(), and pmbus_regulator_list_voltage()
access PMBus registers and shared data but were not protected by
the update_lock mutex. This could lead to race conditions.
However, adding mutex protection directly to these functions causes
a deadlock because pmbus_regulator_notify() (which calls
regulator_notifier_call_chain()) is often called with the mutex
already held (e.g., from pmbus_fault_handler()). If a regulator
callback then calls one of the now-protected voltage functions,
it will attempt to acquire the same mutex.
Rework pmbus_regulator_notify() to utilize a worker function to
send notifications outside of the mutex protection. Events are
stored as atomics in a per-page bitmask and processed by the worker.
Initialize the worker and its associated data during regulator
registration, and ensure it is cancelled on device removal using
devm_add_action_or_reset().
While at it, remove the unnecessary include of linux/of.h.
Cc: Sanman Pradhan <psanman@juniper.net >
Fixes: ddbb4db4ce ("hwmon: (pmbus) Add regulator support")
Reviewed-by: Sanman Pradhan <psanman@juniper.net >
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
2026-03-25 13:32:37 -07:00
..
2026-02-04 14:40:36 -08:00
2026-03-24 07:55:34 -07:00
2026-03-25 13:32:37 -07:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:07 -08:00
2026-02-22 08:26:33 -08:00
2025-03-02 08:42:01 -08:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:32 -07:00
2024-07-07 07:48:25 -07:00
2022-02-09 13:00:45 +00:00
2023-06-08 06:41:17 -07:00
2025-11-26 07:50:13 -08:00
2025-11-26 07:48:31 -08:00
2024-06-08 16:07:32 -07:00
2026-03-25 06:50:13 -07:00
2025-10-15 11:02:43 -07:00
2024-06-08 16:07:32 -07:00
2025-10-17 07:18:06 -07:00
2022-09-25 14:22:12 -07:00
2024-10-02 17:23:23 -04:00
2025-10-16 13:46:06 -07:00
2025-10-17 07:17:48 -07:00
2024-05-01 07:47:49 -07:00
2024-07-31 10:43:51 -07:00
2025-07-20 16:38:34 -07:00
2026-02-22 15:48:30 -08:00
2025-07-20 16:38:34 -07:00
2026-02-21 17:09:51 -08:00
2025-10-17 07:18:15 -07:00
2023-08-21 06:04:29 -07:00
2024-05-01 07:47:49 -07:00
2023-06-08 06:41:17 -07:00
2025-11-21 11:20:59 -08:00
2024-08-27 08:11:15 -07:00
2025-01-12 08:46:23 -08:00
2025-10-17 07:18:15 -07:00
2023-09-29 14:48:31 -07:00
2026-01-31 07:38:31 -08:00
2024-05-01 07:47:49 -07:00
2026-03-17 20:30:57 +01:00
2023-08-21 06:04:29 -07:00
2025-10-19 18:56:14 -07:00
2025-10-17 07:18:15 -07:00
2026-02-22 08:26:33 -08:00
2025-11-13 12:23:26 -08:00
2025-10-17 07:18:15 -07:00
2026-02-07 09:32:20 -08:00
2024-11-10 14:48:07 -08:00
2026-01-31 07:38:31 -08:00
2024-11-10 14:48:07 -08:00
2026-02-21 17:09:51 -08:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:32 -07:00
2024-05-01 07:47:49 -07:00
2025-10-15 11:02:43 -07:00
2025-11-24 11:45:16 -08:00
2026-01-31 07:38:32 -08:00
2024-11-10 14:48:07 -08:00
2026-01-31 07:38:32 -08:00
2024-06-08 16:07:32 -07:00
2026-01-31 07:38:31 -08:00
2026-02-21 17:09:51 -08:00
2025-10-17 05:59:13 -07:00
2024-05-01 07:47:49 -07:00
2024-07-09 15:45:48 -07:00
2024-10-02 17:23:23 -04:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2026-01-31 07:38:32 -08:00
2026-02-02 09:00:28 -08:00
2025-07-20 16:37:09 -07:00
2023-08-21 06:04:29 -07:00
2024-05-01 07:47:49 -07:00
2025-02-24 13:19:12 +02:00
2025-10-17 05:59:12 -07:00
2025-03-18 08:03:40 -07:00
2025-05-02 10:23:47 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2025-10-17 07:18:15 -07:00
2026-02-21 17:09:51 -08:00
2026-02-21 20:03:00 -08:00
2023-09-29 14:48:31 -07:00
2024-07-19 15:55:08 -07:00
2025-10-17 05:59:12 -07:00
2024-05-01 07:47:49 -07:00
2025-10-17 05:59:13 -07:00
2025-10-17 05:59:12 -07:00
2024-12-02 11:34:44 -08:00
2025-05-19 21:56:18 -07:00
2026-02-24 07:31:35 -08:00
2025-10-15 11:02:43 -07:00
2023-04-19 07:08:36 -07:00
2025-11-18 18:46:21 -08:00
2025-04-23 07:18:27 -07:00
2026-03-14 16:25:10 -07:00
2025-05-12 18:05:54 -07:00
2023-08-21 06:04:29 -07:00
2025-09-07 16:33:47 -07:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:32 -07:00
2024-06-08 16:07:32 -07:00
2024-05-01 07:47:49 -07:00
2025-12-02 17:33:02 +01:00
2022-07-13 08:38:19 -07:00
2024-05-01 07:47:49 -07:00
2025-11-26 09:03:56 -08:00
2023-06-08 06:41:17 -07:00
2024-06-08 16:07:33 -07:00
2024-06-08 16:07:33 -07:00
2025-11-26 07:47:25 -08:00
2025-10-15 11:02:43 -07:00
2025-10-17 05:59:12 -07:00
2024-05-01 07:47:49 -07:00
2025-10-17 05:59:12 -07:00
2025-10-17 05:59:13 -07:00
2025-10-15 11:02:43 -07:00
2025-10-17 07:18:10 -07:00
2024-05-01 07:47:49 -07:00
2025-10-17 07:18:02 -07:00
2024-05-01 07:47:49 -07:00
2022-09-25 14:22:12 -07:00
2024-05-01 07:47:49 -07:00
2025-01-15 13:52:43 -08:00
2025-08-07 10:07:06 +02:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2025-10-15 11:02:43 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2025-12-19 08:44:22 -08:00
2023-08-21 06:04:29 -07:00
2026-02-22 15:48:30 -08:00
2026-02-24 07:25:26 -08:00
2025-10-17 05:59:12 -07:00
2024-11-10 14:48:07 -08:00
2023-05-26 13:33:05 +02:00
2024-07-31 10:43:53 -07:00
2024-07-31 10:43:53 -07:00
2025-10-15 11:02:43 -07:00
2024-05-09 12:56:06 -07:00
2026-03-20 16:50:58 -07:00
2023-12-11 06:20:28 -08:00
2025-11-27 08:08:25 -08:00
2026-02-07 09:33:00 -08:00
2022-09-25 14:22:12 -07:00
2024-05-01 07:47:49 -07:00
2024-02-25 12:37:36 -08:00
2025-10-15 11:02:43 -07:00
2025-10-15 11:02:43 -07:00
2025-04-23 07:21:15 -07:00
2025-07-24 09:20:39 +02:00
2024-05-01 07:47:49 -07:00
2024-11-10 14:48:07 -08:00
2024-06-08 16:07:33 -07:00
2025-09-25 08:08:14 -07:00
2025-10-17 05:59:12 -07:00
2026-01-31 07:38:32 -08:00
2025-09-16 14:41:57 +01:00
2026-02-07 09:33:00 -08:00
2024-12-02 11:34:44 -08:00
2026-01-31 07:38:31 -08:00
2024-06-11 07:25:13 -07:00
2026-01-31 07:38:32 -08:00
2024-08-27 08:11:15 -07:00
2025-10-15 11:02:43 -07:00
2025-10-17 07:18:15 -07:00
2023-08-21 06:04:31 -07:00
2025-10-15 11:02:42 -07:00
2024-11-10 14:48:06 -08:00
2024-10-02 17:23:23 -04:00
2025-09-07 16:35:18 -07:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:07 -08:00
2024-05-01 07:47:49 -07:00
2024-11-10 14:48:06 -08:00
2025-10-17 05:59:12 -07:00
2025-03-05 21:17:56 -08:00
2025-09-07 16:33:48 -07:00
2025-04-23 07:18:26 -07:00
2024-12-14 08:00:44 -08:00
2025-10-17 05:59:12 -07:00
2026-02-21 17:09:51 -08:00
2024-08-27 08:10:23 -07:00
2024-02-25 12:37:36 -08:00
2024-11-10 14:48:07 -08:00
2025-10-15 11:04:40 -07:00
2023-08-21 06:04:29 -07:00
2025-10-17 07:18:10 -07:00
2025-02-06 18:51:18 -08:00
2026-01-31 07:38:31 -08:00
2025-10-17 05:59:12 -07:00
2024-11-10 14:48:07 -08:00
2025-09-09 05:26:11 -07:00
2024-07-15 17:39:13 -07:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:06 -08:00
2023-04-19 07:08:38 -07:00
2021-10-12 07:22:41 -07:00
2024-11-10 14:48:07 -08:00
2024-05-01 07:47:49 -07:00
2023-04-19 07:08:38 -07:00
2025-04-23 07:18:27 -07:00
2024-08-27 08:10:23 -07:00
2024-11-10 14:48:06 -08:00
2024-08-27 08:10:23 -07:00
2025-11-26 09:03:15 -08:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:33 -07:00
2025-10-15 11:02:43 -07:00
2025-10-15 11:02:43 -07:00
2026-01-31 07:38:33 -08:00
2025-12-14 09:52:28 -08:00
2025-11-13 12:23:19 -08:00
2025-10-15 11:02:43 -07:00
2025-01-14 15:42:16 -08:00
2025-02-02 17:34:06 -08:00
2025-11-12 12:09:08 -08:00
2024-11-10 14:48:07 -08:00
2024-08-27 08:10:11 -07:00
2024-11-10 14:48:07 -08:00
2026-02-21 17:09:51 -08:00
2025-11-21 07:50:18 -08:00
2025-11-24 11:47:45 -08:00
2024-05-01 07:47:49 -07:00
2025-11-28 08:30:24 -08:00
2025-07-20 16:38:34 -07:00
2024-11-10 14:48:07 -08:00
2024-02-11 13:43:08 -08:00
2025-11-26 09:04:42 -08:00
2025-12-07 14:10:18 -08:00
2024-05-01 07:47:49 -07:00
2026-02-21 17:09:51 -08:00
2024-06-08 16:07:33 -07:00
2025-04-23 07:18:27 -07:00