Old non-MC-aware drivers have no sub-device state
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | media: saa6752hs: Don't set format in sub-device statedrivers/ | +1 | 1 reply | |
| 2/6 | media: adv7183: Don't set format in sub-device statedrivers/ | +0 | 1 reply | |
| 3/6 | media: mt9t112: Don't set format in sub-device statedrivers/ | +0 | 1 reply | |
| 4/6 | media: rj54n1cb0c: Don't set format in sub-device statedrivers/ | +1 | 1 reply | |
| 5/6 | media: tw9910: Don't set format in sub-device statedrivers/ | +0 | 1 reply | |
| 6/6 | media: ov9640: Don't set format in sub-device statedrivers/ | +0 | 1 reply |
Reviews trailers per patch
All 6 patches have a Reviewed-by or Acked-by.
| Patch | Laurent Pinchart |
|---|---|
| 1/6 | R-b |
| 2/6 | R-b |
| 3/6 | R-b |
| 4/6 | R-b |
| 5/6 | R-b |
| 6/6 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/6] Old non-MC-aware drivers have no sub-device state
Hi folks,
This set replaces the earlier attempt to fix non-MC-aware sub-device drivers that still use the set_fmt and similar sub-device ops. These drivers have been converted from the olf set_fmt etc. video ops.
The issue here is that the caller does not initialise the full sub-device state so the sd field of struct v4l2_subdev_state is NULL, leading currently to NULL pointer dereference, even if the code compiles. This was not the case before commit fd17e3a9a7886ec949ce269a396b67875b51ff45 .
Even then, there's no need to access the sub-device state as the format (or selection rectangle) won't be stored for a longer period of time: the caller (saa7134 driver) simply uses the original configuration to obtain the changed value.
This patchset does not address similar issues in the ov6650 driver.
Sakari Ailus (6):
media: saa6752hs: Don't set format in sub-device state
media: adv7183: Don't set format in sub-device state
media: mt9t112: Don't set format in sub-device state
media: rj54n1cb0c: Don't set format in sub-device state
media: tw9910: Don't set format in sub-device state
media: ov9640: Don't set format in sub-device state
drivers/media/i2c/adv7183.c | 2 -- drivers/media/i2c/mt9t112.c | 1 - drivers/media/i2c/ov9640.c | 2 -- drivers/media/i2c/rj54n1cb0c.c | 4 +--- drivers/media/i2c/saa6752hs.c | 4 +--- drivers/media/i2c/tw9910.c | 2 -- 6 files changed, 2 insertions(+), 13 deletions(-)
Signature · 1 line
2.39.2