Skip to content

media: vivid: add vb2_is_busy() checks

Hans Verkuil linux-media stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 2 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2media: vivid: add vivid_update_reduced_fps()drivers/media/test-drivers/vivid/vivid-ctrls.c drivers/media/test-drivers/vivid/vivid-vid-cap.c drivers/media/test-drivers/vivid/vivid-vid-cap.h+22 -141 reply
2/2media: vivid: check for vb2_is_busy() when toggling capsdrivers/media/test-drivers/vivid/vivid-ctrls.c drivers/media/test-drivers/vivid/vivid-vid-cap.c drivers/media/test-drivers/vivid/vivid-vid-out.c+24 -01 reply

Reviews trailers per patch

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

PatchNicolas Dufresne
1/2R-b
2/2R-b

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

Read the v2 thread

Cover letter [PATCHv2 0/2] media: vivid: add vb2_is_busy() checks

There are a number of controls that change the behavior of cropping/composing/scaling, and they all call vivid_update_format_cap/out.

But that function resets the format, so this needs a vb2_is_busy() check.

The REDUCED_FPS control also calls vivid_update_format_cap(), but it doesn't really need that, it can just update the frame period on the fly.

The first patch deals with the REDUCED_FPS control, and the second adds the vb2_is_busy() check for the crop/compose/scale capability controls.

I could reproduce the syzbot crash by manipulating these controls, and with these patches it no longer crashes.

Regards,

Hans

Hans Verkuil (2):
media: vivid: add vivid_update_reduced_fps()
media: vivid: check for vb2_is_busy() when toggling caps

 .../media/test-drivers/vivid/vivid-ctrls.c    | 15 +++++++-
 .../media/test-drivers/vivid/vivid-vid-cap.c  | 38 ++++++++++++-------
 .../media/test-drivers/vivid/vivid-vid-cap.h  |  1 +
 .../media/test-drivers/vivid/vivid-vid-out.c  |  6 +++
 4 files changed, 46 insertions(+), 14 deletions(-)
Signature · 1 line
2.53.0