xshm: calling unlock improperly in xshmchr_chrpoll()
PATCH 1/1 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 <[email protected]>
drivers/xshm/xshm_chr.c +2 -1
@@ -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;
Hi Dan,
Quoted 2 lines
We got interrupted before we could take the lock here, and so we shouldn't call unlock.
Acked-by Sjur Brændeland <[email protected]>
Quoted 1 line
Signed-off-by Dan Carpenter <[email protected]>
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html