1
0
Fork 0
remarkable-linux/drivers/media/dvb-core
Mauro Carvalho Chehab c508ed236c media: dvb_frontend: fix locking issues at dvb_frontend_get_event()
commit 76d81243a4 upstream.

As warned by smatch:
	drivers/media/dvb-core/dvb_frontend.c:314 dvb_frontend_get_event() warn: inconsistent returns 'sem:&fepriv->sem'.
	  Locked on:   line 288
	               line 295
	               line 306
	               line 314
	  Unlocked on: line 303

The lock implementation for get event is wrong, as, if an
interrupt occurs, down_interruptible() will fail, and the
routine will call up() twice when userspace calls the ioctl
again.

The bad code is there since when Linux migrated to git, in
2005.

Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-03 11:25:02 +02:00
..
Kconfig [media] Raise adapter number limit 2016-11-23 13:28:43 -02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
demux.h media: dvb-core/demux.h: fix kernel-doc warning 2017-07-21 08:01:08 -04:00
dmxdev.c media: dmxdev: fix error code for invalid ioctls 2018-05-25 16:17:55 +02:00
dmxdev.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb-usb-ids.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dvb_ca_en50221.c media: dvb_ca_en50221: Fixed multiple blank lines 2017-07-20 15:40:50 -04:00
dvb_ca_en50221.h media: dvb_ca_en50221.h: fix checkpatch strict warnings 2017-07-20 15:47:07 -04:00
dvb_demux.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
dvb_demux.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb_frontend.c media: dvb_frontend: fix locking issues at dvb_frontend_get_event() 2018-07-03 11:25:02 +02:00
dvb_frontend.h [media] docs-rst: media: better document refcount in struct dvb_frontend 2017-04-17 16:55:38 -03:00
dvb_math.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb_math.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb_net.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
dvb_net.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb_ringbuffer.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb_ringbuffer.h scripts/spelling.txt: add "an user" pattern and fix typo instances 2017-02-27 18:43:46 -08:00
dvbdev.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvbdev.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00