* [patch -next] xshm: calling unlock improperly in xshmchr_chrpoll()
@ 2011-12-08 19:24 Dan Carpenter
2011-12-09 12:43 ` [patch -next] xshm: calling unlock improperly in Sjur BRENDELAND
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-12-08 19:24 UTC (permalink / raw)
To: Linus Walleij; +Cc: Sjur Br�ndeland, linux-kernel, kernel-janitors
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [patch -next] xshm: calling unlock improperly in
2011-12-08 19:24 [patch -next] xshm: calling unlock improperly in xshmchr_chrpoll() Dan Carpenter
@ 2011-12-09 12:43 ` Sjur BRENDELAND
0 siblings, 0 replies; 2+ messages in thread
From: Sjur BRENDELAND @ 2011-12-09 12:43 UTC (permalink / raw)
To: Dan Carpenter, Linus Walleij
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Hi Dan,
> We got interrupted before we could take the lock here, and so we
> shouldn't call unlock.
Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thank you for spotting this.
I will include this patch when I send out a new patch-set.
Regards,
Sjur
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-09 12:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-08 19:24 [patch -next] xshm: calling unlock improperly in xshmchr_chrpoll() Dan Carpenter
2011-12-09 12:43 ` [patch -next] xshm: calling unlock improperly in Sjur BRENDELAND
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox