]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
dvb-core: fix several locking related problems
authorSimon Arlott <simon@fire.lp0.eu>
Thu, 29 Mar 2007 01:22:40 +0000 (21:22 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Apr 2007 10:43:16 +0000 (03:43 -0700)
commit5e37b8eb6d8f4caa1150a1f3666e08f69798ed31
tree51ccf1bf0381df709429c76b232e96146417a958
parent69e329bf0268ac4ac74e87636b1c745373d4ed65
dvb-core: fix several locking related problems

dvb-core: fix several locking related problems

Fix several instances of dvb-core functions using mutex_lock_interruptible
and returning -ERESTARTSYS where the calling function will either never
retry or never check the return value.

These cause a race condition with dvb_dmxdev_filter_free and
dvb_dvr_release, both of which are filesystem release functions whose
return value is ignored and will never be retried.  When this happens it
becomes impossible to open dvr0 again (-EBUSY) since it has not been
released properly.

(cherry picked from commit c278850206fd9df0bb62a72ca0b277fe20c5a452)

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-By: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/dvb/dvb-core/dmxdev.c
drivers/media/dvb/dvb-core/dvb_demux.c
drivers/media/dvb/dvb-core/dvbdev.c