summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/msm
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-04-20 16:10:34 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-04-20 16:10:34 -0700
commita94dbcafdfa3bcf67276fc06b961533400b05356 (patch)
tree0a5d8b6f036bffbde98877d7e7173d468c29564d /drivers/video/fbdev/msm
parent9d26a7fb148d536594dbd18d7630533413fcc6bf (diff)
parent64e4e29356928bea60ae4be5b387eb7d8d7a7f45 (diff)
Merge "msm: mdss: fix race condition during mdp debugfs release"
Diffstat (limited to 'drivers/video/fbdev/msm')
-rw-r--r--drivers/video/fbdev/msm/mdss_debug.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/fbdev/msm/mdss_debug.c b/drivers/video/fbdev/msm/mdss_debug.c
index e60869144339..0ecf1ef92ab3 100644
--- a/drivers/video/fbdev/msm/mdss_debug.c
+++ b/drivers/video/fbdev/msm/mdss_debug.c
@@ -59,11 +59,13 @@ static int panel_debug_base_open(struct inode *inode, struct file *file)
static int panel_debug_base_release(struct inode *inode, struct file *file)
{
struct mdss_debug_base *dbg = file->private_data;
+ mutex_lock(&mdss_debug_lock);
if (dbg && dbg->buf) {
kfree(dbg->buf);
dbg->buf_len = 0;
dbg->buf = NULL;
}
+ mutex_unlock(&mdss_debug_lock);
return 0;
}
@@ -385,11 +387,13 @@ static int mdss_debug_base_open(struct inode *inode, struct file *file)
static int mdss_debug_base_release(struct inode *inode, struct file *file)
{
struct mdss_debug_base *dbg = file->private_data;
+ mutex_lock(&mdss_debug_lock);
if (dbg && dbg->buf) {
kfree(dbg->buf);
dbg->buf_len = 0;
dbg->buf = NULL;
}
+ mutex_unlock(&mdss_debug_lock);
return 0;
}