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

Skip to content
Commit 73d583e7 authored by Gopala Krishna Nuthaki's avatar Gopala Krishna Nuthaki
Browse files

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



There is a chance that userspace cooling device cur_state or
min_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 or min_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: If6422327b2bf4235617203588a5fe5805bf918f2
Signed-off-by: default avatarGopala Krishna Nuthaki <quic_gnuthaki@quicinc.com>
parent 93e270aa
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