diff options
author | Hans de Goede <[email protected]> | 2021-11-01 14:53:55 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <[email protected]> | 2021-11-10 11:38:48 +0000 |
commit | d55c3ee6b4c7b76326eb257403762f8bd7cc48c2 (patch) | |
tree | 04b37741df5c33b43b727f77b43ad4e1a8386a67 /tools/perf/scripts/python | |
parent | 678d92b6126b9f55419b6a51ef0a88bce2ef2f20 (diff) |
media: videobuf2-dma-sg: Fix buf->vb NULL pointer dereference
Commit a4b83deb3e76 ("media: videobuf2: rework vb2_mem_ops API")
added a new vb member to struct vb2_dma_sg_buf, but it only added
code setting this to the vb2_dma_sg_alloc() function and not to the
vb2_dma_sg_get_userptr() and vb2_dma_sg_attach_dmabuf() which also
create vb2_dma_sg_buf objects.
This is causing a crash due to a NULL pointer deref when using
libcamera on devices with an Intel IPU3 (qcam app).
Fix these crashes by assigning buf->vb in the other 2 functions too,
note libcamera tests the vb2_dma_sg_get_userptr() path, the change
to the vb2_dma_sg_attach_dmabuf() path is untested.
Fixes: a4b83deb3e76 ("media: videobuf2: rework vb2_mem_ops API")
Cc: Sergey Senozhatsky <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions