On 03/03/2016 01:39 PM, Olli Salonen wrote: > Hello Shuah, > > This patch seems to cause issues with my setup. Basically, when I try > to tune to a channel, I get an oops. I'm using TechnoTrend CT2-4650 > PCIe DVB-T tuner (cx23885). > > Here's the oops: > > [ 548.443272] BUG: unable to handle kernel NULL pointer dereference > at 0000000000000010 > [ 548.452036] IP: [<ffffffffc020ffc9>] > v4l_vb2q_enable_media_source+0x9/0x50 [videodev] Hi Olli, Will you be able to use gdb and tell me which source line is the cause? Could you give this following patch a try and if it fixes the problem? thanks, -- Shuah diff --git a/drivers/media/v4l2-core/v4l2-mc.c b/drivers/media/v4l2-core/v4l2-mc.c index 643686d..a39a3cd 100644 --- a/drivers/media/v4l2-core/v4l2-mc.c +++ b/drivers/media/v4l2-core/v4l2-mc.c @@ -214,6 +214,8 @@ int v4l_vb2q_enable_media_source(struct vb2_queue *q) { struct v4l2_fh *fh = q->owner; - return v4l_enable_media_source(fh->vdev); + if (fh && fh->vdev) + return v4l_enable_media_source(fh->vdev); + return 0; } EXPORT_SYMBOL_GPL(v4l_vb2q_enable_media_source); shuah@anduin:~/lkml/linux_media_feb27_2016$ git diff > temp.diff shuah@anduin:~/lkml/linux_media_feb27_2016$ cat temp.diff diff --git a/drivers/media/v4l2-core/v4l2-mc.c b/drivers/media/v4l2-core/v4l2-mc.c index 643686d..a39a3cd 100644 --- a/drivers/media/v4l2-core/v4l2-mc.c +++ b/drivers/media/v4l2-core/v4l2-mc.c @@ -214,6 +214,8 @@ int v4l_vb2q_enable_media_source(struct vb2_queue *q) { struct v4l2_fh *fh = q->owner; - return v4l_enable_media_source(fh->vdev); + if (fh && fh->vdev) + return v4l_enable_media_source(fh->vdev); + return 0; } EXPORT_SYMBOL_GPL(v4l_vb2q_enable_media_source); -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) shuahkh@xxxxxxxxxxxxxxx | (970) 217-8978 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html