Patch "cpufreq: amd-pstate: fix kernel hang issue while amd-pstate unregistering" has been added to the 6.1-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

    cpufreq: amd-pstate: fix kernel hang issue while amd-pstate unregistering

to the 6.1-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:
     cpufreq-amd-pstate-fix-kernel-hang-issue-while-amd-pstate-unregistering.patch
and it can be found in the queue-6.1 subdirectory.

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


>From 4f3085f87b51a551a0647f218d4f324796ecb703 Mon Sep 17 00:00:00 2001
From: Perry Yuan <perry.yuan@xxxxxxx>
Date: Tue, 10 Jan 2023 23:10:29 +0800
Subject: cpufreq: amd-pstate: fix kernel hang issue while amd-pstate unregistering

From: Perry Yuan <perry.yuan@xxxxxxx>

commit 4f3085f87b51a551a0647f218d4f324796ecb703 upstream.

In the amd_pstate_adjust_perf(), there is one cpufreq_cpu_get() call to
increase increments the kobject reference count of policy and make it as
busy. Therefore, a corresponding call to cpufreq_cpu_put() is needed to
decrement the kobject reference count back, it will resolve the kernel
hang issue when unregistering the amd-pstate driver and register the
`amd_pstate_epp` driver instance.

Fixes: 1d215f0319 ("cpufreq: amd-pstate: Add fast switch function for AMD P-State")
Acked-by: Huang Rui <ray.huang@xxxxxxx>
Reviewed-by: Mario Limonciello <mario.limonciello@xxxxxxx>
Tested-by: Wyes Karny <wyes.karny@xxxxxxx>
Signed-off-by: Perry Yuan <perry.yuan@xxxxxxx>
Cc: 5.17+ <stable@xxxxxxxxxxxxxxx> # 5.17+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/cpufreq/amd-pstate.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -307,6 +307,7 @@ static void amd_pstate_adjust_perf(unsig
 		max_perf = min_perf;
 
 	amd_pstate_update(cpudata, min_perf, des_perf, max_perf, true);
+	cpufreq_cpu_put(policy);
 }
 
 static int amd_get_min_freq(struct amd_cpudata *cpudata)


Patches currently in stable-queue which might be from perry.yuan@xxxxxxx are

queue-6.1/cpufreq-amd-pstate-fix-kernel-hang-issue-while-amd-pstate-unregistering.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