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

Skip to content
Commit 5069a29e authored by Manaf Meethalavalappu Pallikunhi's avatar Manaf Meethalavalappu Pallikunhi
Browse files

drivers: thermal: validate cdev sysfs cur_state request before using it



There is a chance that userspace cooling device cur_state sysfs node
can request any random value. It may be a value greater than
max supported state. In that case if cooling device is not
bailing out, cooling device stats module may behave unexpectedly.

Validate whether cur_state request is within the range of max
supported state or not for each cooling device. If it is greater than
max_state, bail out for that request for different cooling devices.

Change-Id: Iaa6216ad1d2f1e5b92469cd3904715dd6c0b940c
Signed-off-by: default avatarManaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
parent 07c19948
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