* [2.6 patch] ivtv: fix NULL dereference
@ 2007-10-14 17:51 Adrian Bunk
2007-10-14 18:03 ` Hans Verkuil
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2007-10-14 17:51 UTC (permalink / raw)
To: Hans Verkuil, Mauro Carvalho Chehab; +Cc: v4l-dvb-maintainer, linux-kernel
We shouldn't dereference "itv" when we know it's NULL...
Spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
--- linux-2.6/drivers/media/video/ivtv/ivtv-fileops.c.old 2007-10-14 19:17:12.000000000 +0200
+++ linux-2.6/drivers/media/video/ivtv/ivtv-fileops.c 2007-10-14 19:18:05.000000000 +0200
@@ -947,7 +947,7 @@ int ivtv_v4l2_open(struct inode *inode,
if (itv == NULL) {
/* Couldn't find a device registered
on that minor, shouldn't happen! */
- IVTV_WARN("No ivtv device found on minor %d\n", minor);
+ printk(KERN_WARNING "No ivtv device found on minor %d\n", minor);
return -ENXIO;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] ivtv: fix NULL dereference
2007-10-14 17:51 [2.6 patch] ivtv: fix NULL dereference Adrian Bunk
@ 2007-10-14 18:03 ` Hans Verkuil
2007-10-15 18:01 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 3+ messages in thread
From: Hans Verkuil @ 2007-10-14 18:03 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Mauro Carvalho Chehab, v4l-dvb-maintainer, linux-kernel
On Sunday 14 October 2007 19:51:37 Adrian Bunk wrote:
> We shouldn't dereference "itv" when we know it's NULL...
>
> Spotted by the Coverity checker.
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
>
> ---
> --- linux-2.6/drivers/media/video/ivtv/ivtv-fileops.c.old 2007-10-14
> 19:17:12.000000000 +0200 +++
> linux-2.6/drivers/media/video/ivtv/ivtv-fileops.c 2007-10-14
> 19:18:05.000000000 +0200 @@ -947,7 +947,7 @@ int
> ivtv_v4l2_open(struct inode *inode,
> if (itv == NULL) {
> /* Couldn't find a device registered
> on that minor, shouldn't happen! */
> - IVTV_WARN("No ivtv device found on minor %d\n", minor);
> + printk(KERN_WARNING "No ivtv device found on minor %d\n", minor);
> return -ENXIO;
> }
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Luckily this is something that 'shoudn't happen' :-)
Oddly enough it is correct in my standalone driver.
Mauro, can you merge this with 2.6.24 as well? Or shall I add it to my
ivtv tree with my other outstanding fixes?
Regards,
Hans
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] ivtv: fix NULL dereference
2007-10-14 18:03 ` Hans Verkuil
@ 2007-10-15 18:01 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2007-10-15 18:01 UTC (permalink / raw)
To: Hans Verkuil; +Cc: Adrian Bunk, v4l-dvb-maintainer, linux-kernel
Em Dom, 2007-10-14 às 20:03 +0200, Hans Verkuil escreveu:
> On Sunday 14 October 2007 19:51:37 Adrian Bunk wrote:
> > We shouldn't dereference "itv" when we know it's NULL...
> >
> > Spotted by the Coverity checker.
> >
> > Signed-off-by: Adrian Bunk <bunk@kernel.org>
> >
> > ---
> > --- linux-2.6/drivers/media/video/ivtv/ivtv-fileops.c.old 2007-10-14
> > 19:17:12.000000000 +0200 +++
> > linux-2.6/drivers/media/video/ivtv/ivtv-fileops.c 2007-10-14
> > 19:18:05.000000000 +0200 @@ -947,7 +947,7 @@ int
> > ivtv_v4l2_open(struct inode *inode,
> > if (itv == NULL) {
> > /* Couldn't find a device registered
> > on that minor, shouldn't happen! */
> > - IVTV_WARN("No ivtv device found on minor %d\n", minor);
> > + printk(KERN_WARNING "No ivtv device found on minor %d\n", minor);
> > return -ENXIO;
> > }
>
>
> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
>
> Mauro, can you merge this with 2.6.24 as well? Or shall I add it to my
> ivtv tree with my other outstanding fixes?
I'm applying it. I prefer to handle the fix changesets first, in
separate requests.
Later, I'll pull from your ivtv tree, together with the changesets
you're working for 2.6.25.
Btw, as I've received the patch via Adrian's e-mail, I've changed your
tag to "Reviewed-by".
Cheers,
Mauro
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-15 18:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-14 17:51 [2.6 patch] ivtv: fix NULL dereference Adrian Bunk
2007-10-14 18:03 ` Hans Verkuil
2007-10-15 18:01 ` Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox