提交 41f03a00 编写于 作者: K Kamil Debski 提交者: Mauro Carvalho Chehab

[media] s5p-mfc: Fix NULL pointer dereference caused by not set q->lock

The patch "media: s5p-mfc: use vb2_ops_wait_prepare/finish helper"
(654a731b) introduced a kernel panic.
The q->lock was set for just one queue, the other was not set thus causing
a NULL pointer dereference.
Reported-by: NMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: NKamil Debski <k.debski@samsung.com>
Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 f7cbd688
......@@ -833,6 +833,7 @@ static int s5p_mfc_open(struct file *file)
q->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
q->io_modes = VB2_MMAP;
q->drv_priv = &ctx->fh;
q->lock = &dev->mfc_mutex;
if (vdev == dev->vfd_dec) {
q->io_modes = VB2_MMAP;
q->ops = get_dec_queue_ops();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册