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

Skip to content
Commit 72f464e9 authored by Pracheer's avatar Pracheer Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: Avoid accessing invalid CPU ids



While getting input for min and max freq from userspace,
checking against just the number of present CPUs can
cause an access to an invalid CPU id if the userspace
input is not properly constructed for a particular
target. This change prevents that from happening by
checking against num_present_cpus() - 1 so that
invalid CPU ids are not considered while accepting
input from userspace.

Change-Id: I9e52a175ff8ea9448a0676695a63ffddfa12419e
Signed-off-by: default avatarPracheer <pracheer@codeaurora.org>
parent c120e76f
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