- 20 5月, 2011 40 次提交
-
-
由 Jonathan Nieder 提交于
It should not be possible to enter mpeg_open and acquire core->lock without the blackbird driver being registered, so just error out if it is not. This makes the code more readable and should prevent the bug fixed by the patch "hold device lock during sub-driver initialization" from resurfacing again. Similarly, if we enter mpeg_release and acquire core->lock then either the blackbird driver is registered (since open files keep it loaded) or the sysadmin forced the driver's removal. In the latter case the state will be inconsistent and this is worth a loud warning. Tested-by: NAndi Huber <hobrom@gmx.at> Tested-by: NMarlon de Boer <marlon@hyves.nl> Signed-off-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Jonathan Nieder 提交于
Add and use a mutex to protect the cx88-mpeg device list. Previously the BKL prevented races. Based on work by Ben Hutchings <ben@decadent.org.uk>. Tested-by: NAndi Huber <hobrom@gmx.at> Tested-by: NMarlon de Boer <marlon@hyves.nl> Signed-off-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Jonathan Nieder 提交于
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: NAndreas Huber <hobrom@gmx.at> Tested-by: NAndi Huber <hobrom@gmx.at> Tested-by: NMarlon de Boer <marlon@hyves.nl> Cc: stable@kernel.org Signed-off-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Jonathan Nieder 提交于
The BKL conversion of this driver seems to have gone wrong. Loading the cx88-blackbird driver deadlocks. The cause: mpeg_ops::open in the cx2388x blackbird driver acquires the device lock and calls the sub-driver's request_acquire, which tries to acquire the lock again. Fix it by clarifying the semantics of request_acquire, request_release, advise_acquire, and advise_release: now all will rely on the caller to acquire the device lock. Based on work by Ben Hutchings <ben@decadent.org.uk>. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=31962Reported-by: NAndi Huber <hobrom@gmx.at> Tested-by: NAndi Huber <hobrom@gmx.at> Tested-by: NMarlon de Boer <marlon@hyves.nl> Cc: stable@kernel.org Signed-off-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Jonathan Nieder 提交于
The BKL conversion of this driver seems to have gone wrong. Various uses of the sub-device and driver lists appear to be subject to race conditions. In particular, some functions access drvlist without a relevant lock held, which will race against removal of drivers. Let's start with that --- clean up by consistently protecting dev->drvlist with dev->core->lock, noting driver functions that require the device lock to be held or not to be held. After this patch, there are still some races --- e.g., cx8802_blackbird_remove can run between the time the blackbird driver is acquired and the time it is used in mpeg_release, and there's a similar race in cx88_dvb_bus_ctrl. Later patches will address the remaining known races and the deadlock noticed by Andi. This patch just makes the semantics clearer in preparation for those later changes. Based on work by Ben Hutchings <ben@decadent.org.uk>. Tested-by: NAndi Huber <hobrom@gmx.at> Tested-by: NMarlon de Boer <marlon@hyves.nl> Cc: stable@kernel.org Signed-off-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 HIRANO Takahito 提交于
Signed-off-by: NHIRANO Takahito <hiranotaka@zng.info> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Ondrej Zary 提交于
Enabling force_testpattern module parameter in usbvision causes kernel panic. Things like that does not belong to the kernel anyway so the fix is easy. Signed-off-by: NOndrej Zary <linux@rainbow-software.org> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Ondrej Zary 提交于
Add Nogatech USB MicroCam PAL (NV3001P) and NTSC (NV3000N) support to usbvision driver. PAL version is tested, NTSC untested. Data captured using usbsnoop, init_values are listed in the INF file along with image dimensions, offsets and frame rates. Signed-off-by: NOndrej Zary <linux@rainbow-software.org> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Malcolm Priestley 提交于
Improve PID filtering and program register 20 correctly. Make sure stream_on message is sent if streaming is off, otherwise PIDs are not registered. Move mutex outside lme2510_enable_pid. Signed-off-by: NMalcolm Priestley <tvboxspy@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Malcolm Priestley 提交于
usb_buffer not inside mutex lock, waiting caller can alter buffer. Static added to lme2510_exit and lme2510_exit_int. Signed-off-by: NMalcolm Priestley <tvboxspy@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Malcolm Priestley 提交于
Gate could close after first I2C message. On stv0288 it does. Keep 2nd and 3rd message I2C gate control alive. Remove unnecessary gate closing in this module. Signed-off-by: NMalcolm Priestley <tvboxspy@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Jesper Juhl 提交于
In drivers/media/dvb/siano/smsusb.c we have this code: ... kfree(dev); sms_info("device %p destroyed", dev); ... at least one static analysis tool (Coverity Prevent) complains about this as a use-after-free bug. While it's true that we do use the pointer variable after freeing it, the only use is to print the value of the pointer, so there's not actually any problem here. But still, silencing the complaint is trivial by just moving the kfree() call below the sms_info(), so why not just do it?. It doesn't change the workings of the code in any way, but it makes the tool shut up. The patch below also removes a rather pointless blank line. Signed-off-by: NJesper Juhl <jj@chaosbits.net> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Mauro Carvalho Chehab 提交于
On some situations, it is desired to use eeprom data to detect the board type. This patch adds a logic for it and fixes 2 detection issues: 1) 10Moons UT-821 uses a generic Trident ID. Other boards also share the same ID. So, better to use an alternative way for it; 2) Sometimes, HVR-900H is loaded with the default Trident ID. This seems to be some hardware bug or race condition. The new logic will only be enabled if the device is detected as having a generic ID. Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Malcolm Priestley 提交于
Signed-off-by: NMalcolm Priestley <tvboxspy@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Malcolm Priestley 提交于
Return device errors to demuxer from on/off streamming and pid filtering. Please test this patch with all dvb-usb devices. Signed-off-by: NMalcolm Priestley <tvboxspy@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Alexey Khoroshilov 提交于
There are a couple of places where mutex_unlock() is called even if mutex_lock_interruptible() failed. The patch fixes the issue. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Márcio Alves 提交于
[mchehab@redhat.com: avoided board renumberation, removed an unused #define and re-used the existing mb86a20s dvb attach code] Signed-off-by: NMárcio A Alves <froooozen@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Marko Ristola 提交于
Avoid unnecessary DVB TS 188 sized packet copying from DMA buffer into stack. Backtrack one 188 sized packet just after some garbage bytes when possible. This obsoletes patch https://patchwork.kernel.org/patch/118147/Signed-off-by: NMarko Ristola <marko.ristola@kolumbus.fi> Acked-by: NAndreas Oberritter <obi@linuxtv.org> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Jesper Juhl 提交于
We leak the memory allocated to 'fw' (the firmware) when the variable goes out of scope. Fix the leak by calling release_firmware(fw) before 'fw' goes out of scope. Signed-off-by: NJesper Juhl <jj@chaosbits.net> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Jesper Juhl 提交于
If the second memory allocation in dib9000_attach() fails, we'll leak the memory allocated by the first. Signed-off-by: NJesper Juhl <jj@chaosbits.net> Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Steven Toth 提交于
Add support for mmap method streaming of raw YUV video on cx18-based hardware, in addition to the existing support for read() streaming of raw YUV and MPEG-2 encoded video. [simon.farnsworth@onelan.co.uk: I forward-ported this from Steven's original work, done under contract to ONELAN. The original code is at http://www.kernellabs.com/hg/~stoth/cx18-videobuf] Signed-off-by: NSteven Toth <stoth@kernellabs.com> Signed-off-by: NSimon Farnsworth <simon.farnsworth@onelan.co.uk> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Stefan Ringel 提交于
add CARDLIST Signed-off-by: NStefan Ringel <stefan.ringel@arcor.de> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
Adding jpeg enable module parameter. Signed-off-by: NDean Anderson <linux-dev@sensoray.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
adding MJPEG format Signed-off-by: NDean Anderson <linux-dev@sensoray.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Thiago Farina 提交于
Signed-off-by: NThiago Farina <tfransosi@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Malcolm Priestley 提交于
A greatly simplified version of the PID Filter now added back to the Driver. The driver allows for the PID filter to be turned off. applied after patch 683781. Signed-off-by: NMalcolm Priestley <tvboxspy@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Malcolm Priestley 提交于
Register 42 bits 2,3,6 and 7 should be set to 0. This gives difficult locking on some channels and may be compensated for by other methods. This affects any driver using the stv0288 frontend on the default or earda inittab. Signed-off-by: NMalcolm Priestley <tvboxspy@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Malcolm Priestley 提交于
stv0288 Register 42 bits 6 & 7 should be set to 0. This is causing intermittent lock, the dvb-usb-lmedm04 driver uses register 50 (auto fine mode) to correct for this, this register is now returned to its default setting. Signed-off-by: NMalcolm Priestley <tvboxspy@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Pete Eberlein 提交于
An usb_submit_urb should be atomic in a completion handler. This fixes "BUG: scheduling while atomic" messages. Signed-off-by: NPete Eberlein <pete@sensoray.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Oliver Endriss 提交于
Add support for TT S-1500 with BSBE1-D01A tuner. Signed-off-by: NOliver Endriss <o.endriss@gmx.de> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Hans Petter Selasky 提交于
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Jean-Francois Moine 提交于
Signed-off-by: NJean-François Moine <moinejf@free.fr> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Mariusz Kozlowski 提交于
Seems like 'adap->fe' test for NULL was meant to be before we dereference that pointer. Signed-off-by: NMariusz Kozlowski <mk@lab.zgora.pl> Acked-by: NPatrick Boettcher <patrick.boettcher@dibcom.fr> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Dan Carpenter 提交于
The generic_standards_cnt define is only used in one place and it's more readable to just call ARRAY_SIZE(generic_standards) directly. Signed-off-by: NDan Carpenter <error27@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Dan Carpenter 提交于
This function returns NULL on failure so lets do that if kzalloc() fails. There is a separate problem that the caller for this function doesn't check for errors... Signed-off-by: NDan Carpenter <error27@gmail.com> Acked-By: NMike Isely <isely@pobox.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Timothy Lee 提交于
This card has a TD18271 silicon tuner, and uses TDA8290 and LGS8G75 to demodulate analog and digital broadcast respectively. GPIO configurations were derived using DScaler regspy. Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Jean Delvare 提交于
The ability to force the encoder or decoder chip was broken by commit 0ab6e1c3 in February 2009. As nobody complained for over 2 years, I take it that these parameters were no longer used so we can simply drop them. Signed-off-by: NJean Delvare <khali@linux-fr.org> Cc: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Florian Mickler 提交于
usb_control_msg initiates (and waits for completion of) a dma transfer using the supplied buffer. That buffer thus has to be seperately allocated on the heap. In lib/dma_debug.c the function check_for_stack even warns about it: WARNING: at lib/dma-debug.c:866 check_for_stack Tested-by: NMalcolm Priestley <tvboxspy@gmail.com> Signed-off-by: NFlorian Mickler <florian@mickler.org> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Florian Mickler 提交于
usb_control_msg initiates (and waits for completion of) a dma transfer using the supplied buffer. That buffer thus has to be seperately allocated on the heap. In lib/dma_debug.c the function check_for_stack even warns about it: WARNING: at lib/dma-debug.c:866 check_for_stack Signed-off-by: NFlorian Mickler <florian@mickler.org> Acked-by: NAntti Palosaari <crope@iki.fi> Reviewed-by: NAntti Palosaari <crope@iki.fi> Tested-by: NAntti Palosaari <crope@iki.fi> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Florian Mickler 提交于
usb_control_msg initiates (and waits for completion of) a dma transfer using the supplied buffer. That buffer thus has to be seperately allocated on the heap. In lib/dma_debug.c the function check_for_stack even warns about it: WARNING: at lib/dma-debug.c:866 check_for_stack Signed-off-by: NFlorian Mickler <florian@mickler.org> Acked-by: NAntti Palosaari <crope@iki.fi> Reviewed-by: NAntti Palosaari <crope@iki.fi> Tested-by: NAntti Palosaari <crope@iki.fi> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-