Skip to content
Commit 3ce315a7 authored by Bartosz Szczepanek's avatar Bartosz Szczepanek Committed by Zhang Rui
Browse files

thermal/int340x_thermal: Prevent page fault on .set_mode() op



Starting from commit "thermal/int340x_thermal: Don't require IDSP to
exist", priv->current_uuid_index is initialized to -1. This value may
be passed to int3400_thermal_run_osc() from int3400_thermal_set_mode,
contributing to page fault when accessing int3400_thermal_uuids array
at index -1.

This commit adds a check on uuid value to int3400_thermal_run_osc.

Fixes: 8d485da0 ("thermal/int340x_thermal: Don't require IDSP to exist")
Signed-off-by: default avatarBartosz Szczepanek <bsz@semihalf.com>
Reviewed-by: default avatarPandruvada, Srinivas <srinivas.pandruvada@linux.intel.com>
[ rzhang: Add Fixes tag ]
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
Link: https://lore.kernel.org/r/20200708134613.131555-1-bsz@semihalf.com
parent 9ebcfadb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment