Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Fang Wang" <32840572@qq.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH 6.6.y] hwmon: (pmbus/core) Protect regulator operations with mutex
Date: Mon, 08 Jun 2026 06:28:55 +0000	[thread overview]
Message-ID: <20260608062856.21D2B1F00893@smtp.kernel.org> (raw)
In-Reply-To: <tencent_53D6CAB7A20BCE168EA9DF22F0E78EF14509@qq.com>

> From: Guenter Roeck <linux@roeck-us.net>
> 
> [ Upstream commit 754bd2b4a084b90b5e7b630e1f423061a9b9b761 ]
> 
> 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.
> [ ... ]
> Cc: Sanman Pradhan <psanman@juniper.net>
> Fixes: ddbb4db4ced1b ("hwmon: (pmbus) Add regulator support")
> Reviewed-by: Sanman Pradhan <psanman@juniper.net>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Fang Wang <32840572@qq.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_53D6CAB7A20BCE168EA9DF22F0E78EF14509@qq.com?part=1


  reply	other threads:[~2026-06-08  6:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08  6:20 [PATCH 6.6.y] hwmon: (pmbus/core) Protect regulator operations with mutex Fang Wang
2026-06-08  6:28 ` sashiko-bot [this message]
2026-06-09  0:51 ` Sasha Levin

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=20260608062856.21D2B1F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=32840572@qq.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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