[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111208192402.GA8810@elgon.mountain>
Date: Thu, 8 Dec 2011 22:24:02 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Sjur Br�ndeland
<sjur.brandeland@...ricsson.com>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
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@...cle.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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists