aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorKamil Debski <k.debski@samsung.com>2015-03-03 09:32:58 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-03-04 06:59:58 -0500
commit41f03a00536ebb3d72c051f9e7efe2d4ab76ebc8 (patch)
tree43c858bdff9dc777739c6dff451f6e79f612f6d5 /drivers/media
parentf7cbd688f039a3adefc9210226b7edf5bd8fd6cd (diff)
[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" (654a731be1a0b6f606f3f3d12b50db08f2ae3c3) 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: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 8e44a59d8ec2..98374e8bad3e 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -833,6 +833,7 @@ static int s5p_mfc_open(struct file *file)
833 q->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; 833 q->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
834 q->io_modes = VB2_MMAP; 834 q->io_modes = VB2_MMAP;
835 q->drv_priv = &ctx->fh; 835 q->drv_priv = &ctx->fh;
836 q->lock = &dev->mfc_mutex;
836 if (vdev == dev->vfd_dec) { 837 if (vdev == dev->vfd_dec) {
837 q->io_modes = VB2_MMAP; 838 q->io_modes = VB2_MMAP;
838 q->ops = get_dec_queue_ops(); 839 q->ops = get_dec_queue_ops();