Patch "cpufreq/amd-pstate: Add the missing cpufreq_cpu_put()" has been added to the 6.11-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: Add the missing cpufreq_cpu_put()

to the 6.11-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-add-the-missing-cpufreq_cpu_put.patch
and it can be found in the queue-6.11 subdirectory.

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



commit 43fb7040567ced74430fe800777f88c5a82a6f53
Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@xxxxxxx>
Date:   Fri Aug 9 06:08:16 2024 +0000

    cpufreq/amd-pstate: Add the missing cpufreq_cpu_put()
    
    [ Upstream commit 49243adc715e6ae34d6cc003827e63bcf5b3a21d ]
    
    Fix the reference counting of cpufreq_policy object in amd_pstate_update()
    function by adding the missing cpufreq_cpu_put().
    
    Fixes: e8f555daacd3 ("cpufreq/amd-pstate: fix setting policy current frequency value")
    Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@xxxxxxx>
    Reviewed-by: Perry Yuan <perry.yuan@xxxxxxx>
    Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 259a917da75f3..073ca9caf52ac 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -554,12 +554,15 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf,
 	}
 
 	if (value == prev)
-		return;
+		goto cpufreq_policy_put;
 
 	WRITE_ONCE(cpudata->cppc_req_cached, value);
 
 	amd_pstate_update_perf(cpudata, min_perf, des_perf,
 			       max_perf, fast_switch);
+
+cpufreq_policy_put:
+	cpufreq_cpu_put(policy);
 }
 
 static int amd_pstate_verify(struct cpufreq_policy_data *policy)




[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