69c271f33b
On Wed, Jul 07, 2010 at 02:52:58PM +0200, Jiri Slaby wrote: > Hi, > > stanse found a locking error in lirc_dev_fop_read: > if (mutex_lock_interruptible(&ir->irctl_lock)) > return -ERESTARTSYS; > ... > while (written < length && ret == 0) { > if (mutex_lock_interruptible(&ir->irctl_lock)) { #1 > ret = -ERESTARTSYS; > break; > } > ... > } > > remove_wait_queue(&ir->buf->wait_poll, &wait); > set_current_state(TASK_RUNNING); > mutex_unlock(&ir->irctl_lock); #2 > > If lock at #1 fails, it beaks out of the loop, with the lock unlocked, > but there is another "unlock" at #2. This should do the trick. Completely untested beyond compiling, but its not exactly a complicated fix, and in practice, I'm not aware of anyone ever actually tripping that locking bug, so there's zero functional change in typical use here. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> |
||
---|---|---|
.. | ||
keymaps | ||
imon.c | ||
ir-core-priv.h | ||
ir-functions.c | ||
ir-jvc-decoder.c | ||
ir-keytable.c | ||
ir-lirc-codec.c | ||
ir-nec-decoder.c | ||
ir-raw-event.c | ||
ir-rc5-decoder.c | ||
ir-rc6-decoder.c | ||
ir-sony-decoder.c | ||
ir-sysfs.c | ||
Kconfig | ||
lirc_dev.c | ||
lirc_dev.h | ||
Makefile | ||
mceusb.c | ||
rc-map.c |