[PATCH v5] vb2: check for sane values from queue_setup

2018-09-17 Thread Johan Fjeldtvedt
being 0. Signed-off-by: Johan Fjeldtvedt --- drivers/media/common/videobuf2/videobuf2-core.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c index f32ec7342ef0..14cedf42e907 100644

[PATCH v4] vb2: check for sane values from queue_setup

2018-09-11 Thread Johan Fjeldtvedt
being 0. v4: check num_planes, not num_buffers Signed-off-by: Johan Fjeldtvedt --- drivers/media/common/videobuf2/videobuf2-core.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c index

[PATCH v3] vb2: check for sane values from queue_setup

2018-09-11 Thread Johan Fjeldtvedt
being 0. Signed-off-by: Johan Fjeldtvedt --- drivers/media/common/videobuf2/videobuf2-core.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c index f32ec7342ef0..5741e95e6af1 100644

[PATCH v2] vb2: check for sane values from queue_setup

2018-09-11 Thread Johan Fjeldtvedt
Warn when driver sets 0 number of planes or 0 as plane sizes. Signed-off-by: Johan Fjeldtvedt --- drivers/media/common/videobuf2/videobuf2-core.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2

[PATCH] vb2: check for sane values from queue_setup

2018-09-11 Thread Johan Fjeldtvedt
Warn when driver sets 0 number of planes or 0 as plane sizes. --- drivers/media/common/videobuf2/videobuf2-core.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c index

[PATCH] [media] cpia2_usb: drop bogus interface-release call

2018-03-07 Thread Johan Hovold
Drop bogus call to usb_driver_release_interface() from the disconnect() callback. As the interface is already being unbound at this point, usb_driver_release_interface() simply returns early. Signed-off-by: Johan Hovold <jo...@kernel.org> --- drivers/media/usb/cpia2/cpia2_usb.c | 3 ---

[PATCH] [media] cx231xx-cards: fix NULL-deref on missing association descriptor

2017-09-21 Thread Johan Hovold
vi <srinivasa.de...@conexant.com> Reported-by: Andrey Konovalov <andreyk...@google.com> Signed-off-by: Johan Hovold <jo...@kernel.org> --- drivers/media/usb/cx231xx/cx231xx-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/cx231xx/cx231xx-ca

Re: usb/media/cx231xx: null-ptr-deref in cx231xx_usb_probe

2017-09-21 Thread Johan Hovold
face, where > assoc_desc = udev->actconfig->intf_assoc[0]. There seems to be no > check that the device actually contains an Interface Association > Descriptor. That is indeed a bug; I'll respond to this mail with a fix. Thanks, Johan

Re: [PATCH 1/2] staging: greybus: light: Don't leak memory for no gain

2017-07-25 Thread Johan Hovold
); > goto out_free; > @@ -580,7 +576,6 @@ static int gb_lights_light_v4l2_register(struct gb_light > *light) > return ret; > > out_free: > - kfree(sd_cfg); This looks a bit lazy, even if I just noticed that you repurpose this error label (without renaming it) in you second patch. > return ret; > } And while it's fine to take this through linux-media, it would still be good to keep the maintainers on CC. Thanks, Johan

Re: Null Pointer Dereference in mceusb

2017-07-03 Thread Johan Hovold
On Mon, Jul 03, 2017 at 03:41:59PM +0700, Lars Melin wrote: > On 2017-07-03 15:10, Johan Hovold wrote: > > On Thu, Jun 29, 2017 at 07:41:24PM +0200, Sebastian wrote: > >> Sorry for the long delay, Johan. > >> > >> 2017-06-01 9:20 GMT+02:00 Johan Hovold <jo.

Re: Null Pointer Dereference in mceusb

2017-07-03 Thread Johan Hovold
On Thu, Jun 29, 2017 at 07:41:24PM +0200, Sebastian wrote: > Sorry for the long delay, Johan. > > 2017-06-01 9:20 GMT+02:00 Johan Hovold <jo...@kernel.org>: > > [ +CC: media list ] > > > > On Wed, May 31, 2017 at 08:25:42PM +0200, Sebastian wrote: > > &

[PATCH 2/2] [media] mceusb: drop redundant urb reinitialisation

2017-06-01 Thread Johan Hovold
Drop a since commit e1159cb35712 ("[media] mceusb: remove pointless mce_flush_rx_buffer function") redundant reinitialisation of two urb fields immediately after they have been initialised. Signed-off-by: Johan Hovold <jo...@kernel.org> --- drivers/media/rc/mceusb.c | 3 --- 1

[PATCH 1/2] [media] mceusb: fix memory leaks in error path

2017-06-01 Thread Johan Hovold
Fix urb and transfer-buffer leaks in an urb-submission error path which may be hit when a device is disconnected. Fixes: 66e89522aff7 ("V4L/DVB: IR: add mceusb IR receiver driver") Cc: stable <sta...@vger.kernel.org> # 2.6.36 Cc: Jarod Wilson <ja...@redhat.com> Signed-of

Re: Null Pointer Dereference in mceusb

2017-06-01 Thread Johan Hovold
check to catch that recently went in (and was backported to the non-EOL stable trees). Thanks, Johan

[PATCH] [media] usbvision: add missing USB-descriptor endianness conversions

2017-05-12 Thread Johan Hovold
Add the missing endianness conversions to a debug call printing the USB device-descriptor idVendor and idProduct fields during probe. Signed-off-by: Johan Hovold <jo...@kernel.org> --- drivers/media/usb/usbvision/usbvision-video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [git:media_tree/master] [media] gspca: konica: add missing endpoint sanity check

2017-04-10 Thread Johan Hovold
On Wed, Apr 05, 2017 at 06:07:31PM +, Mauro Carvalho Chehab wrote: > This is an automatic generated email to let you know that the > following patch were queued: > > Subject: [media] gspca: konica: add missing endpoint sanity check > Author: Johan Hovold <jo...@kernel.org&g

Re: [PATCH 0/6] [media] fix missing endpoint sanity checks

2017-04-03 Thread Johan Hovold
On Mon, Mar 13, 2017 at 01:53:53PM +0100, Johan Hovold wrote: > This series fixes a number of NULL-pointer dereferences (and related > issues) due to missing endpoint sanity checks that can be triggered by a > malicious USB device. > Johan Hovold (6): > [media] dib0700: fix NULL

[PATCH 4/6] [media] cx231xx-audio: fix init error path

2017-03-13 Thread Johan Hovold
Make sure to release the snd_card also on a late allocation error. Fixes: e0d3bafd0258 ("V4L/DVB (10954): Add cx231xx USB driver") Cc: stable <sta...@vger.kernel.org> # 2.6.30 Cc: Sri Deevi <srinivasa.de...@conexant.com> Signed-off-by: Johan Hovold <jo...@kernel.or

[PATCH 2/6] [media] usbvision: fix NULL-deref at probe

2017-03-13 Thread Johan Hovold
table <sta...@vger.kernel.org> # 2.6.21 Cc: Thierry MERLE <thierry.me...@free.fr> Signed-off-by: Johan Hovold <jo...@kernel.org> --- drivers/media/usb/usbvision/usbvision-video.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/usbvision/usbvis

[PATCH 6/6] [media] gspca: konica: add missing endpoint sanity check

2017-03-13 Thread Johan Hovold
be no risk for a NULL-pointer dereference here. Fixes: b517af722860 ("V4L/DVB: gspca_konica: New gspca subdriver for konica chipset using cams") Cc: stable <sta...@vger.kernel.org> # 2.6.37 Cc: Hans de Goede <hdego...@redhat.com> Signed-off-by: Johan Hovold <jo...@kerne

[PATCH 5/6] [media] cx231xx-audio: fix NULL-deref at probe

2017-03-13 Thread Johan Hovold
# 2.6.30 Cc: Sri Deevi <srinivasa.de...@conexant.com> Signed-off-by: Johan Hovold <jo...@kernel.org> --- drivers/media/usb/cx231xx/cx231xx-audio.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/cx231xx/cx231xx-audio.c

[PATCH 3/6] [media] cx231xx-cards: fix NULL-deref at probe

2017-03-13 Thread Johan Hovold
# 2.6.30 Cc: Sri Deevi <srinivasa.de...@conexant.com> Signed-off-by: Johan Hovold <jo...@kernel.org> --- drivers/media/usb/cx231xx/cx231xx-cards.c | 45 +++ 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/drivers/media/usb/cx231xx/cx231xx-

[PATCH 1/6] [media] dib0700: fix NULL-deref at probe

2017-03-13 Thread Johan Hovold
;mche...@kernel.org> Signed-off-by: Johan Hovold <jo...@kernel.org> --- drivers/media/usb/dvb-usb/dib0700_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/usb/dvb-usb/dib0700_core.c b/drivers/media/usb/dvb-usb/dib0700_core.c index dd5edd3a17ee..08acdd32e412 100644

[PATCH 0/6] [media] fix missing endpoint sanity checks

2017-03-13 Thread Johan Hovold
This series fixes a number of NULL-pointer dereferences (and related issues) due to missing endpoint sanity checks that can be triggered by a malicious USB device. Johan Johan Hovold (6): [media] dib0700: fix NULL-deref at probe [media] usbvision: fix NULL-deref at probe [media] cx231xx

[PATCH] [media] mceusb: fix NULL-deref at probe

2017-03-07 Thread Johan Hovold
table <sta...@vger.kernel.org> # 2.6.36 Signed-off-by: Johan Hovold <jo...@kernel.org> --- Found through inspection, compile tested only. Johan drivers/media/rc/mceusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceus

[PATCHv2] pulse8-cec: store logical address mask

2016-09-07 Thread Johan Fjeldtvedt
In addition to setting the ACK mask, also set the logical address mask setting in the dongle. This is (and not the ACK mask) is persisted for use in autonomous mode. The logical address mask to use is deduced from the primary device type in adap->log_addrs. Signed-off-by: Johan Fjeldtvedt &

[PATCH 2/2] pulse8-cec: store logical address mask

2016-08-30 Thread Johan Fjeldtvedt
In addition to setting the ACK mask, also set the logical address mask setting in the dongle. This is (and not the ACK mask) is persisted for use in autonomous mode. The logical address mask to use is deduced from the primary device type in adap->log_addrs. Signed-off-by: Johan Fjeldtvedt &

[PATCH 1/2] pulse8-cec: fixes

2016-08-30 Thread Johan Fjeldtvedt
Fix some small things: - clean up setup function - use MSGEND instead of 0xfe - don't assign "return value" from cec_phys_addr to err, it has return type void. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- drivers/staging/media/pulse8-cec/p

[PATCH 2/2] cec-follower: extend man page

2016-08-26 Thread Johan Fjeldtvedt
The man page is extended with some more information about the tool and what it does, and a SEE ALSO section is added. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-follower/cec-follower.1.in | 45 ++-- 1 file changed, 38 insertions

[PATCH 1/2] cec-compliance: extend man page

2016-08-26 Thread Johan Fjeldtvedt
The man page is extended with a more detailed description including a more in-depth explanation of the different test result codes. An example of how to run tests is also included, and a SEE ALSO section is added. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-complian

[PATCH] cec-compliance: recognize PRESUMED_OK and REFUSED as ok

2016-08-26 Thread Johan Fjeldtvedt
It is only checked for PRESUMED_OK and REFUSED when performing remote tests, but these test result codes are also used elsewhere, so checking for them is moved to the ok function. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-compliance/cec-compliance.cpp | 9 +++--

[PATCHv2] cec tools: exit if device is disconnected

2016-08-24 Thread Johan Fjeldtvedt
If the CEC device is disconnected, ioctl will return ENODEV. This is checked for in cec-ctl (when monitoring), cec-follower and cec-compliance, to make these exit when the CEC device disappears. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-compliance/cec-compliance.

[PATCH] cec tools: exit when CEC device is disconnected

2016-08-24 Thread Johan Fjeldtvedt
ENODEV instead of EIO when devices are disconnected. Johan Fjeldtvedt (1): cec tools: exit if device is disconnected utils/cec-compliance/cec-compliance.h | 9 +++-- utils/cec-ctl/cec-ctl.cpp | 7 ++- utils/cec-follower/cec-processing.cpp | 14 -- 3 files

[PATCH] cec tools: exit if device is disconnected

2016-08-24 Thread Johan Fjeldtvedt
If the CEC device is disconnected, ioctl will return ENODEV. This is checked for in cec-ctl (when monitoring), cec-follower and cec-compliance, to make these exit when the CEC device disappears. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-compliance/cec-compliance.

[PATCH] cec-ctl: print correct destination address for broadcast msgs

2016-08-24 Thread Johan Fjeldtvedt
When messages are broadcast, it is not necessary to supply a --to option to cec-ctl, but in that case the destination address was printed wrongly. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-ctl/cec-ctl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] cec-compliance: fix Device OSD Transfer tests

2016-08-24 Thread Johan Fjeldtvedt
in interactive mode, we should wait for at least 20 s and ask the user if there was any change (according to the CEC 1.4b CTS). Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-compliance/cec-test.cpp | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-)

[PATCHv2] cec-compliance: improve One Touch Play tests wrt. CTS 1.4b

2016-08-23 Thread Johan Fjeldtvedt
On, and changing to the correct input when receiving Image/Text View On (followed by Active Source) Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-compliance/cec-test-power.cpp | 100 +--- 1 file changed, 67 insertions(+), 33 deletions(-) diff

[PATCH] cec-compliance: improve One Touch Play tests wrt. CTS 1.4b

2016-08-23 Thread Johan Fjeldtvedt
On, and changing to the correct input when receiving Image/Text View On (followed by Active Source) Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-compliance/cec-test-power.cpp | 101 +--- 1 file changed, 68 insertions(+), 33 deletions(-) diff

[PATCH] cec-follower: check for Routing Information from TV

2016-08-22 Thread Johan Fjeldtvedt
A TV shall not send a Routing Information message as initiator. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-follower/cec-processing.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/utils/cec-follower/cec-processing.cpp b/utils/cec-follower/cec-processi

[PATCHv2 2/4] pulse8-cec: serialize communication with adapter

2016-08-22 Thread Johan Fjeldtvedt
Make sending messages to the adapter serialized within the driver. send_and_wait is split into send_and_wait_once, which only sends once and checks for the result, and the higher level send_and_wait, which performs locking and retries. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.

[PATCHv2 3/4] pulse8-cec: add notes about behavior in autonomous mode

2016-08-22 Thread Johan Fjeldtvedt
The pulse8 dongle has some quirky behaviors when in autonomous mode. Document these. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- drivers/staging/media/pulse8-cec/pulse8-cec.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/staging/media/puls

[PATCHv2 0/4] pulse8-cec: Add support for storing and optionally restoring config

2016-08-22 Thread Johan Fjeldtvedt
warnings and spelling error - Add missing break - Don't propagate internal error code to user space Johan Fjeldtvedt (4): cec: allow configuration both from within driver and from user space pulse8-cec: serialize communication with adapter pulse8-cec: add notes about behavior in autonomous mode

[PATCHv2 1/4] cec: allow configuration both from within driver and from user space

2016-08-22 Thread Johan Fjeldtvedt
It makes sense for adapters such as the Pulse-Eight to be configurable both from within the driver and from user space, so remove the requirement that drivers only can call cec_s_log_addrs or cec_s_phys_addr if they don't expose those capabilities to user space. Signed-off-by: Johan Fjeldtvedt

[PATCHv2 4/4] pulse8-cec: sync configuration with adapter

2016-08-22 Thread Johan Fjeldtvedt
is unconfigured, autonomous mode is disabled. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- drivers/staging/media/pulse8-cec/pulse8-cec.c | 266 ++ 1 file changed, 228 insertions(+), 38 deletions(-) diff --git a/drivers/staging/media/pulse8-cec/pulse8-cec.c b/d

[PATCH 2/4] pulse8-cec: serialize communication with adapter

2016-08-19 Thread Johan Fjeldtvedt
Make sending messages to the adapter serialized within the driver. send_and_wait is split into send_and_wait_once, which only sends once and checks for the result, and the higher level send_and_wait, which performs locking and retries. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.

[PATCH 4/4] pulse8-cec: sync configuration with adapter

2016-08-19 Thread Johan Fjeldtvedt
is unconfigured, autonomous mode is disabled. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- drivers/staging/media/pulse8-cec/pulse8-cec.c | 259 ++ 1 file changed, 221 insertions(+), 38 deletions(-) diff --git a/drivers/staging/media/pulse8-cec/pulse8-cec.c b/d

[PATCH 1/4] cec: allow configuration both from within driver and from user space

2016-08-19 Thread Johan Fjeldtvedt
It makes sense for adapters such as the Pulse-Eight to be configurable both from within the driver and from user space, so remove the requirement that drivers only can call cec_s_log_addrs or cec_s_phys_addr if they don't expose those capabilities to user space. Signed-off-by: Johan Fjeldtvedt

[PATCH 3/4] pulse8-cec: add notes about behavior in autonomous mode

2016-08-19 Thread Johan Fjeldtvedt
The pulse8 dongle has some quirky behaviors when in autonomous mode. Document these. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- drivers/staging/media/pulse8-cec/pulse8-cec.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/staging/media/puls

[PATCH] cec-follower/cec-compliance: fix bug in string conversion

2016-08-19 Thread Johan Fjeldtvedt
In all_dev_types2s: don't try to erase the last two characters in the string if it is empty. This was fixed in cec-ctl, so the same fix is applied to cec-compliance and cec-follower. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-compliance/cec-compliance.cpp | 4 +++-

Re: Technotrend TT-Connect CT 3650 and dvb_ca

2012-03-07 Thread Johan Henæs
On Mar 7, 2012, at 5:23 PM, Martin MAURER wrote: Hi Johan, I have a similar problem which happens every few days with this card. For me it helps to remove and reinsert the kernel module whenever this happens. rmmod -f dvb_usb_ttusb2 modprobe dvb_usb_ttusb2 Thanks a lot, Martin ! My

Technotrend TT-Connect CT 3650 and dvb_ca

2012-03-06 Thread Johan Henæs
size! dvb_ca adapter 0: DVB CAM link initialisation failed :(/ Any ideas on what might be wrong ? Best regards, Johan -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

RE: [PATCHv8 00/12] Contiguous Memory Allocator

2011-01-04 Thread Johan MOSSBERG
. Hwmem currently does not use cma but the next version probably will. /Johan Mossberg -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: CI USB]

2010-01-10 Thread Johan
be great... regards, Johan -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: av7110 error reporting

2010-01-06 Thread Johan
Oliver Endriss wrote: Hi, Johan wrote: I need some guidance on error messages.. T [ 7678.312025] dvb-ttpci: StartHWFilter error buf 0b07 0010 0803 b96a ret 0 handle These start as soon as I view or record a channel, and obviously fills up the log quickly. I believe the code

av7110 error reporting

2009-12-30 Thread Johan
handle being larger then 32. On my system it always reports . Am I looking at faulty hardware, or can I resolve this issue more elegant than just disabling the fault report? (keep in mind that I do not have a programming/coding background) Johan start of code--- static int

Re: em28xx based USB Hybrid (Analog DVB-T) TV Tuner not supported

2009-11-07 Thread Johan Mutsaerts
Hi, Seems like you are on a hot trail here ... Great ! What can I do to test your hypothesis on the EM2881_BOARD_DNT_DA2_HYBRID ? May be I can verify if analog works ? How are my chances in getting DVB supported ? TIA for your time and effort in helping out. Best Regards, Johan 2009/11/7

Fwd: em28xx based USB Hybrid (Analog DVB-T) TV Tuner not supported

2009-11-07 Thread Johan Mutsaerts
Sorry, forgot to reply all -- Forwarded message -- From: Johan Mutsaerts joh...@gmail.com Date: 2009/11/7 Subject: Re: em28xx based USB Hybrid (Analog DVB-T) TV Tuner not supported To: Devin Heitmueller dheitmuel...@kernellabs.com Hi, Something caught my eye while

Technotrend C-2300 problem getting channel lock

2009-07-09 Thread Johan Henæs
regards, johan $ lspci -vvv: 02:09.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01) Subsystem: Technotrend Systemtechnik GmbH Octal/Technotrend DVB-C for iTV Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap