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:
Dhaval Patel <pdhaval@codeaurora.org>
Loading
Please register or sign in to comment