summaryrefslogtreecommitdiff
path: root/Documentation/controllers/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2026-03-31 10:33:46 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-04-01 15:53:47 +0200
commit9266b4da051a410d9e6c5c0b0ef0c877855aa1b8 (patch)
tree9c1b9c29b54fe45231dd10eee6ae015a8d85e1ff /Documentation/controllers/git@git.tavy.me:linux.git
parent6e39ba4e5a82aa5469b2ac517b74a71accb0540f (diff)
cpufreq: Allocate QoS freq_req objects with policy
A recent change exposed a bug in the error path: if freq_qos_add_request(boost_freq_req) fails, min_freq_req may remain a valid pointer even though it was never successfully added. During policy teardown, this leads to an unconditional call to freq_qos_remove_request(), triggering a WARN. The current design allocates all three freq_req objects together, making the lifetime rules unclear and error handling fragile. Simplify this by allocating the QoS freq_req objects at policy allocation time. The policy itself is dynamically allocated, and two of the three requests are always needed anyway. This ensures consistent lifetime management and eliminates the inconsistent state in failure paths. Reported-by: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com> Fixes: 6e39ba4e5a82 ("cpufreq: Add boost_freq_req QoS request") Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Lifeng Zheng <zhenglifeng1@huawei.com> Tested-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com> Link: https://patch.msgid.link/a293f29d841b86c51f34699c6e717e01858d8ada.1774933424.git.viresh.kumar@linaro.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'Documentation/controllers/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions