media: vb2: check memory model for VIDIOC_CREATE_BUFS
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 8 Nov 2018 12:23:37 +0000 (07:23 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 23 Nov 2018 11:21:27 +0000 (06:21 -0500)
commit62dcb4f41836bd3c44b5b651bb6df07ea4cb1551
treee8e3f62c0a3cdbe4c22daacf1875a1c465cd5a1a
parent2912289a518077ddb8214e05336700148e97e235
media: vb2: check memory model for VIDIOC_CREATE_BUFS

vb2_core_create_bufs did not check if the memory model for newly added
buffers is the same as for already existing buffers. It should return an
error if they aren't the same.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: syzbot+e1fb118a2ebb88031d21@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org> # for v4.16 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/common/videobuf2/videobuf2-core.c