diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-09-09 16:08:03 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-09-14 12:54:45 +0100 |
commit | 4cf7a8fc0bd5a2c6b606f27101d905f63a846b5f (patch) | |
tree | 138cd9d3938a3e02be9cbcd03c09ece25b23c247 /package/gentoo/media-libs/libcamera | |
parent | 3bcb7a90c1b1404e51015bda9add4d2ba467c052 (diff) |
libcamera: v4l2_videodevice: Handle unexpected buffers
A kernel bug can lead to unexpected buffers being dequeued where we
haven't entered the buffer in our queuedBuffers_ list.
This causes invalid accesses if not handled correctly within libcamera,
and while it is a kernel issue, we can protect against unpatched
kernels to provide a more suitable error message.
This is fixed in the kernel by commit c592b46907ad ("media:
videobuf2-core: dequeue if start_streaming fails") [0]
[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c592b46907ad
Handle unexpected buffers by returning a nullptr, and move cache
management after the validation of the buffer.
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'package/gentoo/media-libs/libcamera')
0 files changed, 0 insertions, 0 deletions