Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d1885ab5 authored by Rama Aparna Mallavarapu's avatar Rama Aparna Mallavarapu
Browse files

devfreq: update mon status when updating the polling interval



When handling the polling interval update, ensure to set the
mon_started to false since the hwmon would be suspended anyway. This
would prevent unclocked access of BWMON when update_devfreq races
with the polling interval update. Also set the mon_started to true
as soon as the interval update and hwmon resume are completed.
This patch fixes the following race condition that could happen.
devfreq_bw_hwmon_ev_handler {		update_devfreq {
    ....			    	   get_target_freq
    ....				   devfreq_bw_hwmon_get_freq {
    hw->suspend_hwmon(hw);			....
    devfreq_interval_update(df, &sample_ms);	__bw_hwmon_hw_sample_end {
    ret = hw->resume_hwmon(hw);			hwmon->get_bytes_and_clear
    ....					....

Change-Id: I4cdab066ff184891aaeb22cb8b3af31213015ff1
Signed-off-by: default avatarRama Aparna Mallavarapu <aparnam@codeaurora.org>
parent 30d171ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment