Patch "hwmon: (pmbus_core) Fix Deadlock in pmbus_regulator_get_status" has been added to the 6.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    hwmon: (pmbus_core) Fix Deadlock in pmbus_regulator_get_status

to the 6.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hwmon-pmbus_core-fix-deadlock-in-pmbus_regulator_get_status.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From b84000f2274520f73ac9dc59fd9403260b61c4e7 Mon Sep 17 00:00:00 2001
From: Guenter Roeck <linux@xxxxxxxxxxxx>
Date: Wed, 26 Jul 2023 20:18:13 -0700
Subject: hwmon: (pmbus_core) Fix Deadlock in pmbus_regulator_get_status

From: Guenter Roeck <linux@xxxxxxxxxxxx>

commit b84000f2274520f73ac9dc59fd9403260b61c4e7 upstream.

pmbus_regulator_get_status() acquires update_lock.
pmbus_regulator_get_error_flags() acquires it again, resulting in an
immediate deadlock.

Call _pmbus_get_flags() from pmbus_regulator_get_status() directly
to avoid the problem.

Reported-by: Patrick Rudolph <patrick.rudolph@xxxxxxxxxxxxx>
Closes: https://lore.kernel.org/linux-hwmon/b7a3ad85-aab4-4718-a001-1d8b1c0eef36@xxxxxxxxxxxx/T/#u
Cc: Naresh Solanki <Naresh.Solanki@xxxxxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx # v6.2+
Fixes: c05f477c4ba3 ("hwmon: (pmbus/core) Implement regulator get_status")
Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/hwmon/pmbus/pmbus_core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -2946,6 +2946,7 @@ static int pmbus_regulator_get_status(st
 	struct pmbus_data *data = i2c_get_clientdata(client);
 	u8 page = rdev_get_id(rdev);
 	int status, ret;
+	int event;
 
 	mutex_lock(&data->update_lock);
 	status = pmbus_get_status(client, page, PMBUS_STATUS_WORD);
@@ -2965,7 +2966,7 @@ static int pmbus_regulator_get_status(st
 		goto unlock;
 	}
 
-	ret = pmbus_regulator_get_error_flags(rdev, &status);
+	ret = _pmbus_get_flags(data, rdev_get_id(rdev), &status, &event, false);
 	if (ret)
 		goto unlock;
 


Patches currently in stable-queue which might be from linux@xxxxxxxxxxxx are

queue-6.4/hwmon-nct7802-fix-for-temp6-peci1-processed-even-if-peci1-disabled.patch
queue-6.4/hwmon-pmbus_core-fix-pmbus_is_enabled.patch
queue-6.4/hwmon-aquacomputer_d5next-fix-incorrect-pwm-value-readout.patch
queue-6.4/hwmon-pmbus_core-fix-deadlock-in-pmbus_regulator_get_status.patch
queue-6.4/hwmon-k10temp-enable-amd3255-proc-to-show-negative-temperature.patch
queue-6.4/hwmon-pmbus_core-fix-null-pointer-dereference.patch
queue-6.4/regmap-disable-locking-for-rbtree-and-maple-unit-tes.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux