Skip to content

media: i2c: ov7740: Fix remove() teardown and PM runtime

Biren Pandya linux-media lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2media: i2c: ov7740: Fix use-after-destroy in remove()drivers/media/i2c/ov7740.c+1 -31 reply
2/2media: i2c: ov7740: Fix unchecked pm_runtime_get_sync() in remove()drivers/media/i2c/ov7740.c+6 -31 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] media: i2c: ov7740: Fix remove() teardown and PM runtime

This series addresses two severe issues in the teardown path of the ov7740 image sensor driver.

The first patch addresses a kernel panic caused by a use-after-destroy on the driver's mutex, exacerbated by a double-free of both the mutex and the V4L2 control handler.

The second patch modernizes the runtime PM sleep sequence by properly checking the return value of PM wake operations before issuing I2C power down sequences, preventing unbalanced PM tracking or hangs on disconnected devices.

Biren Pandya (2):
media: i2c: ov7740: Fix use-after-destroy in remove()
media: i2c: ov7740: Fix unchecked pm_runtime_get_sync() in remove()

 drivers/media/i2c/ov7740.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
Signature · 1 line
2.50.1 (Apple Git-155)