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

Commit 14c225c6 authored by Dhaval Patel's avatar Dhaval Patel
Browse files

msm: mdss: pass file pointer as argument to fb_ioctl api



MDSS driver uses file pointer to track the client
and associates the resources based on it. There can
be a race condition between to clients ioctl call
and it can lead to track resources with wrong
caller. This can leads to release/reallocate
resources prematurely to other client which may
show blank screen on display.

One good example client call flow is:
 <-step:1-> fb_open by client-X
 <-step:2-> fb_open by client-Y
 <-step:3-> fb_ioctl by client-X
 <-step:4-> fb_ioctl by client-Y
 <-step:5-> fb_ioctl by client-X
 <-step:6-> fb_close by client-Y

If step-5 and step-6 both are running on two different
CPUs at same time then it may overwrite the file node
unintentionally.

This change tries to pass the file pointer as one of
the argument to IOCTL call. It avoids usage of mutex
lock to support the concurrent calls.

Change-Id: I0bfd76358c80892c8e4f56298bce6c33b4132550
Signed-off-by: default avatarDhaval Patel <pdhaval@codeaurora.org>
parent 8cd988e4
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