summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDhaval Patel <pdhaval@codeaurora.org>2015-11-04 14:01:09 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:47:34 -0700
commit75af757c1b7ba687c81003b6bf8b424d983447bf (patch)
tree3abfb6d926934cef2c2988db51aac49b4e3d0970 /include
parente56fc3b5b0bf0e1a1ef39ab5d0a238e5cb3bd3d8 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fb.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 32d82ae5b55f..87942d80a465 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -288,10 +288,18 @@ struct fb_ops {
int (*fb_ioctl)(struct fb_info *info, unsigned int cmd,
unsigned long arg);
+ /* perform fb specific ioctl v2 (optional) - provides file param */
+ int (*fb_ioctl_v2)(struct fb_info *info, unsigned int cmd,
+ unsigned long arg, struct file *file);
+
/* Handle 32bit compat ioctl (optional) */
int (*fb_compat_ioctl)(struct fb_info *info, unsigned cmd,
unsigned long arg);
+ /* Handle 32bit compat ioctl (optional) */
+ int (*fb_compat_ioctl_v2)(struct fb_info *info, unsigned cmd,
+ unsigned long arg, struct file *file);
+
/* perform fb specific mmap */
int (*fb_mmap)(struct fb_info *info, struct vm_area_struct *vma);