Re: [PATCH] media: tm6000: double free if usb disconnect while streaming

2019-08-13 Thread Sasha Levin
Hi, [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v5.2.8, v4.19.66, v4.14.138, v4.9.189, v4.4.189. v5.2.8: Build OK! v4.19.66: Build

[PATCH] media: tm6000: double free if usb disconnect while streaming

2019-08-13 Thread Sean Young
The usb_bulk_urb will kfree'd on disconnect, so ensure the pointer is set to NULL after each free. stop stream urb killing urb buffer free tm6000: got start feed request tm6000_start_feed tm6000: got start stream request tm6000_start_stream tm6000: pipe reset tm6000: got start feed re

Re: [PATCH] media: tm6000: Spelling s/diconencted/diconnected/

2019-08-07 Thread Geert Uytterhoeven
aari wrote: > >>>> On 7/31/19 4:41 PM, Geert Uytterhoeven wrote: > >>>>> Signed-off-by: Geert Uytterhoeven > >>>>> --- > >>>>> drivers/media/usb/tm6000/tm6000-cards.c | 2 +- > >>>>> 1 file changed, 1 insertio

Re: [PATCH] media: tm6000: Spelling s/diconencted/diconnected/

2019-08-07 Thread Hans Verkuil
terhoeven wrote: >>>>> Signed-off-by: Geert Uytterhoeven >>>>> --- >>>>> drivers/media/usb/tm6000/tm6000-cards.c | 2 +- >>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>> >>>>> diff --git a/drivers/m

Re: [PATCH] media: tm6000: Spelling s/diconencted/diconnected/

2019-08-07 Thread Geert Uytterhoeven
>>> --- > >>> drivers/media/usb/tm6000/tm6000-cards.c | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/drivers/media/usb/tm6000/tm6000-cards.c > >>> b/drivers/media/usb/tm6000/tm6000-car

Re: [PATCH] media: tm6000: Spelling s/diconencted/diconnected/

2019-08-07 Thread Hans Verkuil
On 7/31/19 8:43 PM, Geert Uytterhoeven wrote: > Hi Antti, > > On Wed, Jul 31, 2019 at 8:36 PM Antti Palosaari wrote: >> On 7/31/19 4:41 PM, Geert Uytterhoeven wrote: >>> Signed-off-by: Geert Uytterhoeven >>> --- >>> drivers/media/usb/tm6000/tm6

Re: [PATCH] media: tm6000: Spelling s/diconencted/diconnected/

2019-07-31 Thread Antti Palosaari
On 7/31/19 4:41 PM, Geert Uytterhoeven wrote: Signed-off-by: Geert Uytterhoeven --- drivers/media/usb/tm6000/tm6000-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-cards.c b/drivers/media/usb/tm6000/tm6000-cards.c index

Re: [PATCH] media: tm6000: Spelling s/diconencted/diconnected/

2019-07-31 Thread Geert Uytterhoeven
Hi Antti, On Wed, Jul 31, 2019 at 8:36 PM Antti Palosaari wrote: > On 7/31/19 4:41 PM, Geert Uytterhoeven wrote: > > Signed-off-by: Geert Uytterhoeven > > --- > > drivers/media/usb/tm6000/tm6000-cards.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) &

[PATCH] media: tm6000: Spelling s/diconencted/diconnected/

2019-07-31 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven --- drivers/media/usb/tm6000/tm6000-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-cards.c b/drivers/media/usb/tm6000/tm6000-cards.c index 23df50aa0a4af6da..9a0ffe678524987c 100644 --- a/drivers/media

Re: [PATCH] media: tm6000: add error handling for dvb_register_adapter

2018-06-11 Thread Alexandre-Xavier Labonté-Lamoureux
ter calling dvb_register_adapter. > > Signed-off-by: Zhouyang Jia > --- > drivers/media/usb/tm6000/tm6000-dvb.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/media/usb/tm6000/tm6000-dvb.c > b/drivers/media/usb/tm6000/tm6000-dvb.c > index c811fc6..f

[PATCH] media: tm6000: add error handling for dvb_register_adapter

2018-06-10 Thread Zhouyang Jia
When dvb_register_adapter fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling dvb_register_adapter. Signed-off-by: Zhouyang Jia --- drivers/media/usb/tm6000/tm6000-dvb.c | 5 + 1 file changed, 5 insertions(+) diff --git a

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-21 Thread Gustavo A. R. Silva
On 05/17/2018 01:08 PM, Gustavo A. R. Silva wrote: BTW, Mauro, you sent a patch to fix an spectre v1 issue in this file yesterday: dvb_ca_en50221.c:1480, but it seems there is another instance of the same issue some lines above: diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drive

[PATCH 6/7] media: tm6000: don't check number of messages in the driver

2018-05-19 Thread Wolfram Sang
Since commit 1eace8344c02 ("i2c: add param sanity check to i2c_transfer()"), the I2C core does this check now. We can remove it from drivers. Signed-off-by: Wolfram Sang --- Only build tested. drivers/media/usb/tm6000/tm6000-i2c.c | 2 -- 1 file changed, 2 deletions(-) diff --git

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-17 Thread Gustavo A. R. Silva
On 05/17/2018 07:13 AM, Mauro Carvalho Chehab wrote: Em Thu, 17 May 2018 08:43:24 -0300 Mauro Carvalho Chehab escreveu: On 05/15/2018 02:39 PM, Dan Carpenter wrote: You'd need to rebuild the db (possibly twice but definitely once). How? Here, I just pull from your git tree and do a "m

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-17 Thread Mauro Carvalho Chehab
Em Thu, 17 May 2018 08:43:24 -0300 Mauro Carvalho Chehab escreveu: > > > > On 05/15/2018 02:39 PM, Dan Carpenter wrote: > > > > > >> You'd need to rebuild the db (possibly twice but definitely once). > > > > How? Here, I just pull from your git tree and do a "make". At most, > > make clea

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-17 Thread Mauro Carvalho Chehab
Em Thu, 17 May 2018 08:34:40 -0300 Mauro Carvalho Chehab escreveu: > Em Thu, 17 May 2018 05:36:03 -0500 > "Gustavo A. R. Silva" escreveu: > > > > > > > On 05/16/2018 08:14 PM, Gustavo A. R. Silva wrote: > > > > > > > > > On 05/15/2018 02:39 PM, Dan Carpenter wrote: > > > >> You'd need to r

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-17 Thread Mauro Carvalho Chehab
Em Thu, 17 May 2018 05:36:03 -0500 "Gustavo A. R. Silva" escreveu: > > > On 05/16/2018 08:14 PM, Gustavo A. R. Silva wrote: > > > > > > On 05/15/2018 02:39 PM, Dan Carpenter wrote: > >> You'd need to rebuild the db (possibly twice but definitely once). How? Here, I just pull from your git t

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-17 Thread Gustavo A. R. Silva
On 05/16/2018 08:14 PM, Gustavo A. R. Silva wrote: On 05/15/2018 02:39 PM, Dan Carpenter wrote: Dan, These are all the Spectre media issues I see smatch is reporting in linux-next-20180515: drivers/media/cec/cec-pin-error-inj.c:170 cec_pin_error_inj_parse_line() warn: potential spectre iss

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-16 Thread Gustavo A. R. Silva
On 05/15/2018 02:39 PM, Dan Carpenter wrote: Dan, These are all the Spectre media issues I see smatch is reporting in linux-next-20180515: drivers/media/cec/cec-pin-error-inj.c:170 cec_pin_error_inj_parse_line() warn: potential spectre issue 'pin->error_inj_args' drivers/media/dvb-core/dvb_ca

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-16 Thread Mauro Carvalho Chehab
Em Wed, 16 May 2018 16:11:08 +0300 Dan Carpenter escreveu: > On Tue, May 15, 2018 at 04:00:33PM -0300, Mauro Carvalho Chehab wrote: > > Yeah, that's the same I'm getting from media upstream. > > > > > drivers/media/cec/cec-pin-error-inj.c:170 cec_pin_error_inj_parse_line() > > > warn: potenti

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-16 Thread Dan Carpenter
On Tue, May 15, 2018 at 04:00:33PM -0300, Mauro Carvalho Chehab wrote: > Yeah, that's the same I'm getting from media upstream. > > > drivers/media/cec/cec-pin-error-inj.c:170 cec_pin_error_inj_parse_line() > > warn: potential spectre issue 'pin->error_inj_args' > > This one seems a false positi

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-15 Thread Dan Carpenter
On Tue, May 15, 2018 at 12:29:10PM -0500, Gustavo A. R. Silva wrote: > > > On 05/15/2018 09:16 AM, Dan Carpenter wrote: > > > > > > > > I'm curious about how you finally resolved to handle these issues. > > > > > > > > I noticed Smatch is no longer reporting them. > > > > > > There was no dire

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-15 Thread Mauro Carvalho Chehab
Em Tue, 15 May 2018 12:29:10 -0500 "Gustavo A. R. Silva" escreveu: > On 05/15/2018 09:16 AM, Dan Carpenter wrote: > >>> > >>> I'm curious about how you finally resolved to handle these issues. > >>> > >>> I noticed Smatch is no longer reporting them. > >> > >> There was no direct fix for it, bu

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-15 Thread Gustavo A. R. Silva
On 05/15/2018 09:16 AM, Dan Carpenter wrote: I'm curious about how you finally resolved to handle these issues. I noticed Smatch is no longer reporting them. There was no direct fix for it, but maybe this patch has something to do with the smatch error report cleanup: commit 3ad3b7a2ebaefa

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-15 Thread Dan Carpenter
On Tue, May 15, 2018 at 08:59:53AM -0300, Mauro Carvalho Chehab wrote: > Em Mon, 14 May 2018 22:31:37 -0500 > "Gustavo A. R. Silva" escreveu: > > > Hi Mauro, > > > > On 04/26/2018 06:42 PM, Mauro Carvalho Chehab wrote: > > > > >> > > >> I noticed you changed the status of this series from rejec

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-15 Thread Mauro Carvalho Chehab
Em Mon, 14 May 2018 22:31:37 -0500 "Gustavo A. R. Silva" escreveu: > Hi Mauro, > > On 04/26/2018 06:42 PM, Mauro Carvalho Chehab wrote: > > >> > >> I noticed you changed the status of this series from rejected to new. > > > > Yes. > > > >> Also, there are other similar issues in media/pci/ >

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-14 Thread Gustavo A. R. Silva
Hi Mauro, On 04/26/2018 06:42 PM, Mauro Carvalho Chehab wrote: I noticed you changed the status of this series from rejected to new. Yes. Also, there are other similar issues in media/pci/ Well, the issues will be there everywhere on all media drivers. I marked your patches because I ne

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-26 Thread Mauro Carvalho Chehab
Em Thu, 26 Apr 2018 16:41:56 -0500 "Gustavo A. R. Silva" escreveu: > Hi Mauro, > > On 04/23/2018 02:17 PM, Mauro Carvalho Chehab wrote: > > Em Mon, 23 Apr 2018 14:11:02 -0500 > > > > Thanks, I 'll mark this series as rejected at patchwork.linuxtv.org. > > Please feel free to resubmit any patch

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-26 Thread Gustavo A. R. Silva
Hi Mauro, On 04/23/2018 02:17 PM, Mauro Carvalho Chehab wrote: Em Mon, 23 Apr 2018 14:11:02 -0500 Thanks, I 'll mark this series as rejected at patchwork.linuxtv.org. Please feel free to resubmit any patch if they represent a real threat, adding a corresponding description about the threat scen

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-24 Thread Peter Zijlstra
On Tue, Apr 24, 2018 at 02:47:55PM -0300, Mauro Carvalho Chehab wrote: > So, I'm wondering if are there any way to mitigate it inside the > core itself, instead of doing it on every driver, e. g. changing > v4l_enum_fmt() implementation at v4l2-ioctl. > > Ok, a "poor man" approach would be to pas

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-24 Thread Mauro Carvalho Chehab
Em Tue, 24 Apr 2018 12:36:09 +0200 Peter Zijlstra escreveu: > On Tue, Apr 24, 2018 at 12:35:00PM +0300, Dan Carpenter wrote: > > On Mon, Apr 23, 2018 at 03:24:55PM -0300, Mauro Carvalho Chehab wrote: > > > Em Mon, 23 Apr 2018 12:38:03 -0500 > > > "Gustavo A. R. Silva" escreveu: > > > > > @@

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-24 Thread Peter Zijlstra
On Tue, Apr 24, 2018 at 12:36:09PM +0200, Peter Zijlstra wrote: > > Then usespace probes which part of the descr[] array is now in cache and > from that it can infer the initial out-of-bound value. Just had a better look at v4l_fill_fmtdesc() and actually read the comment. The code cannot be comp

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-24 Thread Peter Zijlstra
On Tue, Apr 24, 2018 at 12:35:00PM +0300, Dan Carpenter wrote: > On Mon, Apr 23, 2018 at 03:24:55PM -0300, Mauro Carvalho Chehab wrote: > > Em Mon, 23 Apr 2018 12:38:03 -0500 > > "Gustavo A. R. Silva" escreveu: > > > @@ -875,6 +876,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, > > >

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-24 Thread Mauro Carvalho Chehab
can be controlled by user-space, hence leading to a > > > potential exploitation of the Spectre variant 1 vulnerability. > > > > > > Smatch warning: > > > drivers/media/usb/tm6000/tm6000-video.c:879 vidioc_enum_fmt_vid_cap() > > > warn: potentia

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-24 Thread Dan Carpenter
ploitation of the Spectre variant 1 vulnerability. > > > > Smatch warning: > > drivers/media/usb/tm6000/tm6000-video.c:879 vidioc_enum_fmt_vid_cap() warn: > > potential spectre issue 'format' > > > > Fix this by sanitizing f->index before using it to index >

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-23 Thread Gustavo A. R. Silva
ontrolled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. Smatch warning: drivers/media/usb/tm6000/tm6000-video.c:879 vidioc_enum_fmt_vid_cap() warn: potential spectre issue 'format' Fix this by sanitizing f->index before using it to ind

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-23 Thread Mauro Carvalho Chehab
lled by user-space, hence leading to a > >> potential exploitation of the Spectre variant 1 vulnerability. > >> > >> Smatch warning: > >> drivers/media/usb/tm6000/tm6000-video.c:879 vidioc_enum_fmt_vid_cap() > >> warn: potential spectre issue 'format'

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-23 Thread Gustavo A. R. Silva
On 04/23/2018 01:24 PM, Mauro Carvalho Chehab wrote: Em Mon, 23 Apr 2018 12:38:03 -0500 "Gustavo A. R. Silva" escreveu: f->index can be controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. Smatch warning: drivers/med

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-23 Thread Mauro Carvalho Chehab
Em Mon, 23 Apr 2018 12:38:03 -0500 "Gustavo A. R. Silva" escreveu: > f->index can be controlled by user-space, hence leading to a > potential exploitation of the Spectre variant 1 vulnerability. > > Smatch warning: > drivers/media/usb/tm6000/tm6000-video.c:879 vi

[PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-23 Thread Gustavo A. R. Silva
f->index can be controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. Smatch warning: drivers/media/usb/tm6000/tm6000-video.c:879 vidioc_enum_fmt_vid_cap() warn: potential spectre issue 'format' Fix this by sanitizing f->in

[PATCH 28/30] media: tm6000: avoid casting just to print pointer address

2018-03-23 Thread Mauro Carvalho Chehab
Instead of casting, just use %p. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/tm6000/tm6000-video.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index 8314d3fa9241

usb/media/tm6000: use-after-free in tm6000_read_write_usb

2017-11-06 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit 39dae59d66acd86d1de24294bd2f343fd5e7a625 (4.14-rc8). usb 1-1: USB disconnect, device number 11 tm6000: disconnecting tm6000 #0 xc2028 0-0061: destroying ins

[PATCH 7/7] tm6000: fix spelling mistake: "synchronuously" -> "synchronously"

2017-11-02 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in error message text Signed-off-by: Colin Ian King --- drivers/media/usb/tm6000/tm6000-dvb.c | 4 ++-- drivers/media/usb/tm6000/tm6000-video.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/usb

[PATCH 9/9] [media] tm6000: Use common error handling code in tm6000_prepare_isoc()

2017-09-15 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 15 Sep 2017 08:02:33 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring --- drivers/media/usb/tm6000/tm6000-video.c | 13 +++-- 1 file changed, 7 insertions(+), 6

[PATCH 8/9] [media] tm6000: Use common error handling code in tm6000_start_stream()

2017-09-15 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 15 Sep 2017 07:47:41 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring --- drivers/media/usb/tm6000/tm6000-dvb.c | 11 +++ 1 file changed, 7 insertions(+), 4

[PATCH 7/9] [media] tm6000: Improve a size determination in dvb_init()

2017-09-15 Thread SF Markus Elfring
issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/media/usb/tm6000/tm6000-dvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-dvb.c b/drivers/media/usb/tm6000/tm6000-dvb.c index 2bc584f75f87..85

[PATCH 6/9] [media] tm6000: Use common error handling code in tm6000_cards_setup()

2017-09-15 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 14 Sep 2017 16:26:42 +0200 Add a jump target so that a bit of exception handling can be better reused in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/media/usb/tm6000/tm6000-cards.c | 7

[PATCH 5/9] [media] tm6000: Delete an unnecessary variable initialisation in tm6000_usb_probe()

2017-09-15 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 14 Sep 2017 16:13:56 +0200 The local variable "rc" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/media/usb/tm6000/tm6000-cards.c | 2 +- 1 file

[PATCH 4/9] [media] tm6000: One function call less in tm6000_usb_probe() after error detection

2017-09-15 Thread SF Markus Elfring
f-by: Markus Elfring --- drivers/media/usb/tm6000/tm6000-cards.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/media/usb/tm6000/tm6000-cards.c b/drivers/media/usb/tm6000/tm6000-cards.c index e18632056976..77347541904d 100644 --- a/drivers/media/usb/t

[PATCH 3/9] [media] tm6000: Use common error handling code in tm6000_usb_probe()

2017-09-15 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 14 Sep 2017 16:00:47 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring --- drivers/media/usb/tm6000/tm6000-cards.c | 11 ++- 1 file changed, 6 insertions(+), 5

[PATCH 2/9] [media] tm6000: Adjust seven checks for null pointers

2017-09-15 Thread SF Markus Elfring
places. Signed-off-by: Markus Elfring --- drivers/media/usb/tm6000/tm6000-cards.c | 2 +- drivers/media/usb/tm6000/tm6000-dvb.c | 6 +++--- drivers/media/usb/tm6000/tm6000-input.c | 2 +- drivers/media/usb/tm6000/tm6000-video.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff

[PATCH 1/9] [media] tm6000: Delete seven error messages for a failed memory allocation

2017-09-15 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 14 Sep 2017 14:34:39 +0200 Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/media/usb/tm6000/tm6000-cards.c | 1 - drivers/media/usb

[PATCH 0/9] [media] TM6000: Adjustments for some function implementations

2017-09-15 Thread SF Markus Elfring
tm6000_start_stream() Use common error handling code in tm6000_prepare_isoc() drivers/media/usb/tm6000/tm6000-cards.c | 36 - drivers/media/usb/tm6000/tm6000-dvb.c | 24 +++--- drivers/media/usb/tm6000/tm6000-input.c | 2 +- drivers/media/usb

[PATCH 4/5] [media] tm6000: constify videobuf_queue_ops structures

2017-08-04 Thread Julia Lawall
r.i; @@ static +const struct videobuf_queue_ops i = { ... }; // Signed-off-by: Julia Lawall --- drivers/media/usb/tm6000/tm6000-video.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index cec

[PATCH 7/7] rc-core: tm6000 - leave the internals of rc_dev alone

2017-05-01 Thread David Härdeman
Not sure what the driver is trying to do, however, IR handling seems incomplete ATM so deleting the offending parts shouldn't affect functionality Signed-off-by: David Härdeman --- drivers/media/usb/tm6000/tm6000-input.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/

[PATCH] [media] tm6000: Fix resource freeing in 'tm6000_prepare_isoc()'

2017-02-22 Thread Christophe JAILLET
tifier f; @@ * if (x == NULL) { ... when != x = e; ( *f(<+...x...+>); | *ret = f(<+...x...+>); ) ... } Signed-off-by: Christophe JAILLET --- drivers/media/usb/tm6000/tm6000-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH -next] [media] media: usb: tm6000: fix typo in parameter description

2017-01-12 Thread Wei Yongjun
From: Wei Yongjun Fix typo in parameter description. Signed-off-by: Wei Yongjun --- drivers/media/usb/tm6000/tm6000-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-input.c b/drivers/media/usb/tm6000/tm6000-input.c index 7fe00a5

[media] tm6000: Addition of an asterisk to the data type for “urb_dma”?

2016-12-24 Thread SF Markus Elfring
Hello, I have looked at the implementation of the function “tm6000_alloc_urb_buffers” once more. https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/media/usb/tm6000/tm6000-video.c?id=84ede50b623fb45c4c026c80d0abf8cc5193f041#n469 A pointer for an array is also assigned

[PATCH] tm6000: Clean up file handle in open() error path.

2016-12-19 Thread Santosh Kumar Singh
Fix to avoid possible memory leak and exit file handle in error paths. Signed-off-by: Santosh Kumar Singh --- drivers/media/usb/tm6000/tm6000-video.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000

[PATCH] tm6000: Clean up file handle in open() error path.

2016-12-19 Thread Santosh Kumar Singh
Fix to avoid possible memory leak and exit file handle in error paths. Signed-off-by: Santosh Kumar Singh --- drivers/media/usb/tm6000/tm6000-video.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000

[PATCH v2 44/58] tm6000: don't break long lines

2016-10-18 Thread Mauro Carvalho Chehab
t;"; } else { if (m/\"$/) { if (!m/\\n\"$/) { $next=$_; next; } } } print $_; } Signed-off-by: Mauro Carvalho Chehab

[PATCH 45/57] [media] tm6000: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
/tm6000/tm6000-alsa.c | 4 +--- drivers/media/usb/tm6000/tm6000-core.c | 11 +++ drivers/media/usb/tm6000/tm6000-dvb.c | 16 +--- drivers/media/usb/tm6000/tm6000-i2c.c | 3 +-- drivers/media/usb/tm6000/tm6000-stds.c | 3 +-- drivers/media/usb/tm6000/tm6000-video.c | 15

[PATCH 26/28] media: usb: tm6000: tm6000-video: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/media/usb/tm6000/tm6000-video.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index fa5e8bda2ae4a7

[PATCH 25/28] media: usb: tm6000: tm6000-dvb: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/media/usb/tm6000/tm6000-dvb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/usb/tm6000/tm6000-dvb.c b/drivers/media/usb/tm6000/tm6000-dvb.c index

[PATCH] [media] cx25821, cx88, tm6000: use SNDRV_DEFAULT_ENABLE_PNP

2015-09-21 Thread Luis de Bethencourt
if that's better. Thanks, Luis drivers/media/pci/cx25821/cx25821-alsa.c | 2 +- drivers/media/pci/cx88/cx88-alsa.c | 2 +- drivers/media/usb/tm6000/tm6000-alsa.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/pci/cx25821/cx25821-alsa.c b/dr

[PATCH 07/11] [media] tm6000: remove needless check

2015-06-05 Thread Mauro Carvalho Chehab
Smatch reports a warning: drivers/media/usb/tm6000/tm6000-video.c:646 tm6000_prepare_isoc() error: we previously assumed 'dev->urb_buffer' could be null (see line 624) This is not really a problem, but it actually shows that the check if urb_buffer is NULL is being done twi

[PATCH 16/19] tm6000: embed video_device

2015-03-09 Thread Hans Verkuil
From: Hans Verkuil Embed the video_device struct to simplify the error handling and in order to (eventually) get rid of video_device_alloc/release. Signed-off-by: Hans Verkuil --- drivers/media/usb/tm6000/tm6000-video.c | 59 + drivers/media/usb/tm6000/tm6000.h

Re: [PATCH v1 41/49] media: usb: tm6000: prepare for enabling irq in complete()

2013-08-22 Thread Hans Verkuil
--- > drivers/media/usb/tm6000/tm6000-video.c |5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/usb/tm6000/tm6000-video.c > b/drivers/media/usb/tm6000/tm6000-video.c > index cc1aa14..8bb440f 100644 > --- a/drivers/media/usb/tm600

[PATCH v1 41/49] media: usb: tm6000: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Signed-off-by: Ming Lei --- drivers/media/usb/tm6000/tm6000-video.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 39/50] media: usb: tm6000: spin_lock in complete() cleanup

2013-07-11 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Signed-off-by: Ming Lei --- drivers/media/usb/tm6000/tm6000-video.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers

[RFC PATCH 07/13] tm6000: remove deprecated current_norm

2013-06-03 Thread Hans Verkuil
From: Hans Verkuil Replace current_norm by g_std. Also initialize the standard to the more common NTSC-M format (which is also what current_norm used). Signed-off-by: Hans Verkuil Cc: Mauro Carvalho Chehab --- drivers/media/usb/tm6000/tm6000-cards.c |2 +- drivers/media/usb/tm6000/tm6000

[PATCH] tm6000: fix an uninitialized variable.

2013-02-07 Thread Hans Verkuil
tm6000_poll could use an uninitialized buf pointer. Move the buf-handling code inside the 'if' that initializes the buf pointer. Signed-off-by: Hans Verkuil Reported-by: Dan Carpenter --- drivers/media/usb/tm6000/tm6000-video.c |8 1 file changed, 4 insertions(+), 4

Re: [media] tm6000: add support for control events and prio handling

2013-02-07 Thread Hans Verkuil
On Thu 7 February 2013 11:44:54 Dan Carpenter wrote: > Hello Hans Verkuil, > > The patch 770056c47fbb: "[media] tm6000: add support for control > events and prio handling" from Sep 11, 2012, leads to the following > Smatch warning: > "drivers/media/usb/tm6000/

re: [media] tm6000: add support for control events and prio handling

2013-02-07 Thread Dan Carpenter
Hello Hans Verkuil, The patch 770056c47fbb: "[media] tm6000: add support for control events and prio handling" from Sep 11, 2012, leads to the following Smatch warning: "drivers/media/usb/tm6000/tm6000-video.c:1462 __tm6000_poll() error: potentially dereferencing uni

[GIT PULL FOR v3.9] v4l2-compliance fixes for tm6000

2013-02-05 Thread Hans Verkuil
These patches fix various v4l2-compliance issues for the tm6000. Tested with my tm6000. Unchanged from the RFC patches posted a few days ago. Regards, Hans The following changes since commit a32f7d1ad3744914273c6907204c2ab3b5d496a0: Merge branch 'v4l_for_linus' in

[RFC PATCH 2/6] tm6000: convert to the control framework.

2013-02-01 Thread Hans Verkuil
From: Hans Verkuil Signed-off-by: Hans Verkuil --- drivers/media/usb/tm6000/tm6000-video.c | 232 +-- drivers/media/usb/tm6000/tm6000.h |3 + 2 files changed, 68 insertions(+), 167 deletions(-) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b

[RFC PATCH 3/6] tm6000: add support for control events and prio handling.

2013-02-01 Thread Hans Verkuil
From: Hans Verkuil Signed-off-by: Hans Verkuil --- drivers/media/usb/tm6000/tm6000-video.c | 31 +++ drivers/media/usb/tm6000/tm6000.h |2 ++ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b

[RFC PATCH 6/6] tm6000: fix G/TRY_FMT.

2013-02-01 Thread Hans Verkuil
From: Hans Verkuil Two fixes: - the priv field wasn't set to 0. - only V4L2_FIELD_INTERLACED is supported. Signed-off-by: Hans Verkuil --- drivers/media/usb/tm6000/tm6000-video.c |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/media/usb/tm6000/t

[RFC PATCH 5/6] tm6000: add poll op for radio device node.

2013-02-01 Thread Hans Verkuil
From: Hans Verkuil Signed-off-by: Hans Verkuil --- drivers/media/usb/tm6000/tm6000-video.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index ac25885..f41dbb1 100644 --- a/drivers/media/usb/tm6000

[RFC PATCH 4/6] tm6000: set colorspace field.

2013-02-01 Thread Hans Verkuil
From: Hans Verkuil Signed-off-by: Hans Verkuil --- drivers/media/usb/tm6000/tm6000-video.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index 25202a7..ac25885 100644 --- a/drivers/media/usb/tm6000

[RFC PATCH 1/6] tm6000: fix querycap and input/tuner compliance issues.

2013-02-01 Thread Hans Verkuil
g the radio would set dev->input to 5 for no good reason. This was never set back to a valid TV input after closing the radio device, thus leaving it at 5 which is out of bounds of the vinput card array. Signed-off-by: Hans Verkuil --- drivers/media/usb/tm6000/tm6000-video.

[RFC PATCH 0/6] tm6000: v4l2-compliance fixes

2013-02-01 Thread Hans Verkuil
globally. Something to work on in a future patch as that's quite a bit more work. fail: v4l2-test-buffers.cpp(109): can_stream && !mmap_valid && !userptr_valid && !dmabuf_valid This is due to the fact that tm6000 doesn't su

[patch] [media] tm6000: check an allocation for failure

2013-01-29 Thread Dan Carpenter
This allocation had no error checking. It didn't need to be under the mutex so I moved it out form there. That makes the error handling easier and is a potential speed up. Signed-off-by: Dan Carpenter diff --git a/drivers/media/usb/tm6000/tm6000-core.c b/drivers/media/usb/tm6000/tm6000-c

[PATCH] [media] tm6000-video.c: warning fix

2012-12-20 Thread Mauro Carvalho Chehab
drivers/media/usb/tm6000/tm6000-video.c: In function '__check_keep_urb': drivers/media/usb/tm6000/tm6000-video.c:1926:1: warning: return from incompatible pointer type [enabled by default] Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/tm6000/tm6000-video.c | 2 +- 1 fi

[PATCH] tm6000-dvb: Fix module unload.

2012-11-05 Thread Julian Scheel
dvb_unregister_frontend has to be called before detach. Otherwise the unregister call will segfault. This made tm6000-dvb module unload unusable. Signed-off-by: Julian Scheel --- drivers/media/usb/tm6000/tm6000-dvb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

Re: [PATCH] tm6000: Add parameter to keep urb bufs allocated.

2012-10-08 Thread Ezequiel Garcia
rated your proposal when comitting it? > You can re-send a new patch with this subject: [PATCH v2] tm6000: Add parameter to keep urb bufs allocated Like here: https://lkml.org/lkml/2012/9/23/128 Notice you can place comments (like a patch changelog) after the: Signed-off --- The maintainer will

Re: [PATCH] tm6000: Add parameter to keep urb bufs allocated.

2012-10-08 Thread Julian Scheel
; reused, so it is ensured that the memory will stay available until the > > driver > > is unloaded. > > > > Signed-off-by: Julian Scheel > > --- > > drivers/media/video/tm6000/tm6000-video.c | 111 > > +- > > dri

Re: [PATCH] tm6000: Add parameter to keep urb bufs allocated.

2012-10-04 Thread Ezequiel Garcia
e first time. Afterwards the initially allocated memory will be > reused, so it is ensured that the memory will stay available until the driver > is unloaded. > > Signed-off-by: Julian Scheel > --- > drivers/media/video/tm6000/tm6000-video.c | 111 > +--

[PATCH] tm6000: Add parameter to keep urb bufs allocated.

2012-10-04 Thread Julian Scheel
the driver is unloaded. Signed-off-by: Julian Scheel --- drivers/media/video/tm6000/tm6000-video.c | 111 +- drivers/media/video/tm6000/tm6000.h | 5 ++ 2 files changed, 97 insertions(+), 19 deletions(-) diff --git a/drivers/media/video/tm6000/tm6000-video.c

[PATCH 12/14] drivers/media/usb/tm6000/tm6000-video.c: fix error return code

2012-09-06 Thread Peter Senna Tschudin
ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // Signed-off-by: Peter Senna Tschudin --- drivers/media/usb/tm6000/tm6000-video.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/usb/tm6000

[TM6000] Request video grabber support for geniatech satbox

2012-08-28 Thread Olcay Korkmaz
Hi All I have geniatech satbox it's tm6000 device with dvbs and Analogue CVBS A/V grabber I know tm6000 module doesn't support dvb-s but can i use satbox for video grabber if I load tm6000 module it's recognized to generic and loaded with XC2028 firmware satbox doesn't have x

[PATCH 3/5] drivers/media/video/{s2255drv.c,tm6000/tm6000-alsa.c,tm6000/tm6000-input.c}: Remove potential NULL dereferences

2012-08-14 Thread Julia Lawall
; @@ - T i = E->fld; + T i; ... when != E when != i if (E == NULL) S + i = E->fld; // Signed-off-by: Julia Lawall --- drivers/media/video/s2255drv.c|3 ++- drivers/media/video/tm6000/tm6000-alsa.c |3 ++- drivers/media/video/tm6000/tm6000-input.c |3

[RFC PATCH 06/26] tm6000: remove V4L2_FL_LOCK_ALL_FOPS

2012-06-24 Thread Hans Verkuil
From: Hans Verkuil Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil --- drivers/media/video/tm6000/tm6000-video.c | 52 - 1 file changed, 43 insertions(+), 9 deletions(-) diff

Fw: tm6000 driver questions

2012-04-25 Thread matthieu castet
- Message Transféré - Date: Wed, 25 Apr 2012 10:16:57 -0700 De: Vladimir Kerkez À: castet.matth...@free.fr Sujet: tm6000 driver questions > Hello, > > I would like to thank you for your outstanding work on the tm6000 > chipset. Because of you (and many other people) I no

Re: [PATCH 07/12] drivers: media: video: tm6000: tm6000.h: Include version.h header

2012-04-19 Thread Mauro Carvalho Chehab
Em 18-04-2012 01:30, Marcos Paulo de Souza escreveu: > The output of "make versioncheck" told us that: > > drivers/media/video/tm6000/tm6000.h: 401: need linux/version.h > > If we take a look at the code, we can see the use of the macro > KERNEL_VERSION. So, we nee

[PATCH 07/12] drivers: media: video: tm6000: tm6000.h: Include version.h header

2012-04-17 Thread Marcos Paulo de Souza
The output of "make versioncheck" told us that: drivers/media/video/tm6000/tm6000.h: 401: need linux/version.h If we take a look at the code, we can see the use of the macro KERNEL_VERSION. So, we need this include. In this patch too, the headers of the file were reordered in alphab

Re: Add usb device id for tm6000-cards.c

2012-04-10 Thread Mauro Carvalho Chehab
Em 22-03-2012 16:37, Marek Chmielewski escreveu: > -- Pozdrawiam Marek Chmielewski > > > patch_for_tm6000-cards.patch > > > --- tm6000-cards.c.bakup 2012-03-10 14:34:07.471348336 +0100 > +++ tm6000-cards.c2012-03-10 15:18:09.856380721 +0100 Please, use it ad d

Re: Add usb device id for tm6000-cards.c

2012-03-22 Thread Sylwester Nawrocki
Hello, On 03/22/2012 08:37 PM, Marek Chmielewski wrote: You need to at least add your "Signed-off-by" in order to have the patch applied to the mainline kernel. Also, it would be good to send the patch inlined, rather than as an attachment. I suggest using git format-patch, git send-email. Mo

Add usb device id for tm6000-cards.c

2012-03-22 Thread Marek Chmielewski
-- Pozdrawiam Marek Chmielewski --- tm6000-cards.c.bakup 2012-03-10 14:34:07.471348336 +0100 +++ tm6000-cards.c 2012-03-10 15:18:09.856380721 +0100 @@ -615,6 +615,7 @@ struct usb_device_id tm6000_id_table[] = { { USB_DEVICE(0x6000, 0x0001), .driver_info = TM5600_BOARD_GENERIC }, { USB_DEVICE

Re: [PATCH] tm6000: Don't use pointer after freeing it in tm6000_ir_fini()

2012-02-09 Thread Jesper Juhl
d not at all on understanding what the code does or why. > > I don't even have a means to test it, so beyond testing that the > > change compiles it has seen no testing what-so-ever. > > > > Anyway, here's a proposed patch. > > > > Signed-off-by: Jesper Juhl >

  1   2   3   4   5   6   7   >