Skip to content

Videobuf2 corner case fixes

Sakari Ailus linux-media 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesNew
  2. v23 patches 15 repliesSuperseded
  3. v13 patches 12 repliesSuperseded

Changes in v3 from the cover letter

- Remove the sanity check from the second patch as suggested by Mauro.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3videobuf2-core: Prevent size alignment wrapping buffer size to 0drivers/media/common/videobuf2/videobuf2-core.c+4 -00 replies
2/3videobuf2-dma-sg: Prevent size from overflowingdrivers/media/common/videobuf2/videobuf2-dma-sg.c+1 -10 replies
3/3videobuf2-core.h: Document the alloc memop size argument as page aligneddrivers/media/common/videobuf2/videobuf2-core.c include/media/videobuf2-core.h+3 -10 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchHans Verkuil
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] Videobuf2 corner case fixes

Hi all,

Here's a third version of the set fixing a few videobuf2 corner cases. Most drivers have limits for the size already but not necessarily all of them.

since v2:

- Remove the sanity check from the second patch as suggested by Mauro.

since v1:

- Add a sanity check for alignment in vb2_dma_sg_alloc_compacted.

- Add a comment in __vb2_buf_mem_alloc noting that the size shall be page aligned.

Sakari Ailus (3):
videobuf2-core: Prevent size alignment wrapping buffer size to 0
videobuf2-dma-sg: Prevent size from overflowing videobuf2-core.h: Document the alloc memop size argument as page
aligned

 drivers/media/common/videobuf2/videobuf2-core.c   | 5 +++++
 drivers/media/common/videobuf2/videobuf2-dma-sg.c | 2 +-
 include/media/videobuf2-core.h                    | 3 ++-
 3 files changed, 8 insertions(+), 2 deletions(-)
Signature · 1 line
2.11.0