linux_dsm_epyc7002/drivers/media/video/cx88
Jonathan Nieder 1d6213ab99 [media] cx88: hold device lock during sub-driver initialization
cx8802_blackbird_probe makes a device node for the mpeg sub-device
before it has been added to dev->drvlist.  If the device is opened
during that time, the open succeeds but request_acquire cannot be
called, so the reference count remains zero.  Later, when the device
is closed, the reference count becomes negative --- uh oh.

Close the race by holding core->lock during probe and not releasing
until the device is in drvlist and initialization finished.
Previously the BKL prevented this race.

Reported-by: Andreas Huber <hobrom@gmx.at>
Tested-by: Andi Huber <hobrom@gmx.at>
Tested-by: Marlon de Boer <marlon@hyves.nl>
Cc: stable@kernel.org
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:37 -03:00
..
cx88-alsa.c [media] cx88-alsa: fix compiler warning 2011-03-22 04:54:03 -03:00
cx88-blackbird.c [media] cx88: hold device lock during sub-driver initialization 2011-05-20 09:29:37 -03:00
cx88-cards.c [media] cx88: add support for TeVii S464 PCI card 2011-03-21 20:32:27 -03:00
cx88-core.c V4L/DVB: videobuf: add queue argument to videobuf_waiton() 2010-10-21 01:06:14 -02:00
cx88-dsp.c V4L/DVB: drivers/media: Make static data tables and strings const 2010-10-21 01:04:52 -02:00
cx88-dvb.c [media] cx88: fix locking of sub-driver operations 2011-05-20 09:29:36 -03:00
cx88-i2c.c [media] cx88: Remove the obsolete i2c_adapter.id field 2010-12-30 12:17:19 -02:00
cx88-input.c [media] Fix cx88 remote control input 2011-05-04 16:30:20 -03:00
cx88-mpeg.c [media] cx88: hold device lock during sub-driver initialization 2011-05-20 09:29:37 -03:00
cx88-reg.h
cx88-tvaudio.c [media] Add proper audio support for Nova-S Plus with wm8775 ADC 2011-03-21 20:32:19 -03:00
cx88-vbi.c V4L/DVB: drivers/media: Make static data tables and strings const 2010-10-21 01:04:52 -02:00
cx88-video.c [media] use pci_dev->revision 2011-05-20 07:26:16 -03:00
cx88-vp3054-i2c.c [media] cx88: Remove the obsolete i2c_adapter.id field 2010-12-30 12:17:19 -02:00
cx88-vp3054-i2c.h
cx88.h [media] cx88: hold device lock during sub-driver initialization 2011-05-20 09:29:37 -03:00
Kconfig [media] rc: rename the remaining things to rc_core 2010-12-29 08:16:50 -02:00
Makefile V4L/DVB (11394): cx88: Add support for stereo and sap detection for A2 2009-06-16 19:14:17 -03:00