lkml.org 
[lkml]   [2011]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch -next] xshm: calling unlock improperly in xshmchr_chrpoll()
We got interrupted before we could take the lock here, and so we
shouldn't call unlock.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/xshm/xshm_chr.c b/drivers/xshm/xshm_chr.c
index 8593367..4df1287 100644
--- a/drivers/xshm/xshm_chr.c
+++ b/drivers/xshm/xshm_chr.c
@@ -620,7 +620,7 @@ static unsigned int xshmchr_chrpoll(struct file *filp, poll_table *waittab)
if (mutex_lock_interruptible(&dev->mutex)) {
xdev_dbg(dev, "mutex_lock_interruptible got signalled\n");
mask |= POLLERR;
- goto out;
+ goto out_unlocked;
}
xshmchr_get(dev);

@@ -644,6 +644,7 @@ static unsigned int xshmchr_chrpoll(struct file *filp, poll_table *waittab)

out:
mutex_unlock(&dev->mutex);
+out_unlocked:
xdev_devl(dev, "poll return mask=0x%04x\n", mask);
xshmchr_put(dev);
return mask;

\
 
 \ /
  Last update: 2011-12-08 20:27    [W:0.139 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site