Skip to content

Commit 72c976f

Browse files
committed
thermal: gov_user_space: Do not lock thermal zone mutex
Commit 670a5e3 ("thermal/core: Move the thermal zone lock out of the governors") moved thermal zone locking away from governors, but it forgot about the user space one which deadlocks now. Fix this by removing the thermal zone locking from the user space governor. Fixes: 670a5e3 ("thermal/core: Move the thermal zone lock out of the governors") Tested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 02af1db commit 72c976f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/thermal/gov_user_space.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ static int notify_user_space(struct thermal_zone_device *tz, int trip)
3434
char *thermal_prop[5];
3535
int i;
3636

37-
mutex_lock(&tz->lock);
37+
lockdep_assert_held(&tz->lock);
38+
3839
thermal_prop[0] = kasprintf(GFP_KERNEL, "NAME=%s", tz->type);
3940
thermal_prop[1] = kasprintf(GFP_KERNEL, "TEMP=%d", tz->temperature);
4041
thermal_prop[2] = kasprintf(GFP_KERNEL, "TRIP=%d", trip);
@@ -43,7 +44,7 @@ static int notify_user_space(struct thermal_zone_device *tz, int trip)
4344
kobject_uevent_env(&tz->device.kobj, KOBJ_CHANGE, thermal_prop);
4445
for (i = 0; i < 4; ++i)
4546
kfree(thermal_prop[i]);
46-
mutex_unlock(&tz->lock);
47+
4748
return 0;
4849
}
4950

0 commit comments

Comments
 (0)