linux/drivers/media/dvb-core
Alexey Khoroshilov 6633327d59 [media] dvb_demux: fix deadlock in dmx_section_feed_release_filter()
dmx_section_feed_release_filter() locks dvbdmx->mutex and
if the feed is still filtering, it calls feed->stop_filtering(feed).
stop_filtering() is implemented by dmx_section_feed_stop_filtering()
that first of all try to lock the same mutex: dvbdmx->mutex.
That leads to a deadlock.
It does not happen often in practice because all callers of
release_filter() stop filtering by themselves.
So the problem can happen in case of race condition only.
The patch releases dvbdmx->mutex before call to feed->stop_filtering(feed)
and reacquires the mutex after that.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-11-29 12:18:25 -02:00
..
demux.h [media] demux.h: Remove duplicated enum 2013-04-08 06:53:15 -03:00
dmxdev.c dmxdev: get rid of pointless clearing ->f_op 2013-10-24 23:34:53 -04:00
dmxdev.h [media] remove include/linux/dvb/dmx.h 2012-10-19 07:29:17 -03:00
dvb_ca_en50221.c [media] dvb: unlock on error in dvb_ca_en50221_io_do_ioctl() 2013-01-06 10:44:45 -02:00
dvb_ca_en50221.h
dvb_demux.c [media] dvb_demux: fix deadlock in dmx_section_feed_release_filter() 2013-11-29 12:18:25 -02:00
dvb_demux.h [media] demux.h: Remove duplicated enum 2013-04-08 06:53:15 -03:00
dvb_filter.c
dvb_filter.h
dvb_frontend.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
dvb_frontend.h [media] tuner-core/simple: get_rf_strength can be tuner mode specific 2013-04-14 19:44:50 -03:00
dvb_math.c
dvb_math.h
dvb_net.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
dvb_net.h [media] dvb: push down ioctl lock in dvb_usercopy 2012-12-27 15:44:21 -02:00
dvb_ringbuffer.c
dvb_ringbuffer.h
dvb-usb-ids.h [media] dib0700: add support for PCTV 2002e & PCTV 2002e SE 2013-07-22 07:48:11 -03:00
dvbdev.c consolidate the reassignments of ->f_op in ->open() instances 2013-10-24 23:34:53 -04:00
dvbdev.h
Kconfig
Makefile