]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
thermal: intel: int340x: Power Slider: Validate slider_balance range
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tue, 23 Sep 2025 20:56:31 +0000 (13:56 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 24 Sep 2025 19:54:55 +0000 (21:54 +0200)
commit5cf952c54f3546f904ded645aecc1788d1090bd2
tree4cef654ad7b9be49451ced46cf579381bdf83f38
parent0115d063559fa6d25e41751cf455dda40aa2c856
thermal: intel: int340x: Power Slider: Validate slider_balance range

When the module parameter slider_balance is set to the performance
slider value of 0, the SoC slider profile switches to the performance
mode.

This can cause the Linux power-profiles-daemon to change the system
power mode to performance from balanced mode. This happens when there
is only one platform profile registered as there will be no conflict
with other platform profiles.

Same issue occurs when the slider_balance is set to the power-saver
slider value.

Prevent module parameter slider_balance from overlapping with
performance and power-saver slider values by adding range validation.

Return an error when an invalid value is provided.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20250923205631.3056590-1-srinivas.pandruvada@linux.intel.com
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/int340x_thermal/processor_thermal_soc_slider.c