Patch "cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_reboot_notifier" has been added to the 5.8-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: powernv: Fix frame-size-overflow in powernv_cpufreq_reboot_notifier

to the 5.8-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-powernv-fix-frame-size-overflow-in-powernv_c.patch
and it can be found in the queue-5.8 subdirectory.

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



commit 0ba72ba0a5e9f1e5ec7b1b61b3de320d31cf4a25
Author: Srikar Dronamraju <srikar@xxxxxxxxxxxxxxxxxx>
Date:   Tue Sep 22 13:32:54 2020 +0530

    cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_reboot_notifier
    
    [ Upstream commit a2d0230b91f7e23ceb5d8fb6a9799f30517ec33a ]
    
    The patch avoids allocating cpufreq_policy on stack hence fixing frame
    size overflow in 'powernv_cpufreq_reboot_notifier':
    
      drivers/cpufreq/powernv-cpufreq.c: In function powernv_cpufreq_reboot_notifier:
      drivers/cpufreq/powernv-cpufreq.c:906:1: error: the frame size of 2064 bytes is larger than 2048 bytes
    
    Fixes: cf30af76 ("cpufreq: powernv: Set the cpus to nominal frequency during reboot/kexec")
    Signed-off-by: Srikar Dronamraju <srikar@xxxxxxxxxxxxxxxxxx>
    Reviewed-by: Daniel Axtens <dja@xxxxxxxxxx>
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20200922080254.41497-1-srikar@xxxxxxxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
index 8646eb197cd96..31f5c4ebbac9f 100644
--- a/drivers/cpufreq/powernv-cpufreq.c
+++ b/drivers/cpufreq/powernv-cpufreq.c
@@ -884,12 +884,15 @@ static int powernv_cpufreq_reboot_notifier(struct notifier_block *nb,
 				unsigned long action, void *unused)
 {
 	int cpu;
-	struct cpufreq_policy cpu_policy;
+	struct cpufreq_policy *cpu_policy;
 
 	rebooting = true;
 	for_each_online_cpu(cpu) {
-		cpufreq_get_policy(&cpu_policy, cpu);
-		powernv_cpufreq_target_index(&cpu_policy, get_nominal_index());
+		cpu_policy = cpufreq_cpu_get(cpu);
+		if (!cpu_policy)
+			continue;
+		powernv_cpufreq_target_index(cpu_policy, get_nominal_index());
+		cpufreq_cpu_put(cpu_policy);
 	}
 
 	return NOTIFY_DONE;



[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