This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media_tree.git tree:
Subject: [media] V4L: sh_mobile_ceu_camera: fix Oops when USERPTR mapping fails Author: Guennadi Liakhovetski <[email protected]> Date: Mon Jul 4 12:15:14 2011 -0300 If vb2_dma_contig_get_userptr() fails on a videobuffer, driver's .buf_init() method will not be called and the list will not be initialised. Trying to remove an uninitialised element from a list leads to a NULL-dereference. Signed-off-by: Guennadi Liakhovetski <[email protected]> Tested-by: Bastian Hecht <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> drivers/media/video/sh_mobile_ceu_camera.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) --- http://git.linuxtv.org/media_tree.git?a=commitdiff;h=86ce6ebf447105de8c0556d942c3d546ce82501d diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index f865507..e540898 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c @@ -422,8 +422,12 @@ static void sh_mobile_ceu_videobuf_release(struct vb2_buffer *vb) pcdev->active = NULL; } - /* Doesn't hurt also if the list is empty */ - list_del_init(&buf->queue); + /* + * Doesn't hurt also if the list is empty, but it hurts, if queuing the + * buffer failed, and .buf_init() hasn't been called + */ + if (buf->queue.next) + list_del_init(&buf->queue); spin_unlock_irq(&pcdev->lock); } _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
