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

Commit 8e64ba50 authored by Arun Menon's avatar Arun Menon
Browse files

msm: vidc: Fix race condition during instance load calculation



There exists a race condition in the driver between an
instance calling v4l2_g_ctrl with the ctrl_handler pointer
and the instance ctrl_handler being deinitialized, since the
driver does not hold a lock when calculating the instance load.

Consider the case of two video instances running concurrently
and one of the instance scaling the clock, while the other is
being closed by the client. Since scale clock calculates the
load for each active instance, for the second instance, the
ctrl_handler pointer which gets passed to v4l2_g_ctrl, gets
freed in another thread. This causes the device to crash due
to bad memory access.

Change-Id: Icffd835ea1959bb33dcd0d6eab800063d891ddef
Signed-off-by: default avatarArun Menon <avmenon@codeaurora.org>
parent 0d88d69d
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