soc: qcom: msm_perf: Fix a race condition in hotplug callback
msm_performance relies on userspace to initialize cluster related
variables such as num_clusters, managed_cpus etc. Once num_clusters
is set the cluster related data structures are initialized and
userspace is allowed to set them.
However there could be a race where between num_clusters being set
and the cluster data structures being allocated, there is a hotplug
activity which would invoke the hotplug callback which in turn tries
to access managed_cpus. managed_cpus might not have been allocated by
that time resulting in a NULL pointer access in the callback causing
kernel panic.
Change-Id: Ia40af624322a89e0c0f9598bf7eea059e6969ebe
Signed-off-by:
Rohit Gupta <rohgup@codeaurora.org>
Loading
Please register or sign in to comment