Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] media: atomisp: fix probe memory leaks
@ 2026-06-15  7:28 Dawei Feng
  2026-06-15  7:28 ` [PATCH v2 1/2] media: atomisp: fix memory leak in atomisp_pci_probe() Dawei Feng
  2026-06-15  7:28 ` [PATCH v2 2/2] media: atomisp: fix memory leak in atomisp_csi2_bridge_parse_firmware() Dawei Feng
  0 siblings, 2 replies; 11+ messages in thread
From: Dawei Feng @ 2026-06-15  7:28 UTC (permalink / raw)
  To: andy
  Cc: error27, hansg, mchehab, sakari.ailus, gregkh,
	abdelrahmanfekry375, linux-kernel, linux-media, linux-staging,
	jianhao.xu, Dawei Feng

This series fixes two memory leaks in the atomisp PCI probe and adjusts
cleanup paths.

Patch 1 fixes the cleanup boundary for media entities created during
module initialization. atomisp_uninitialize_modules() did not release all
module-owned state and instead left some media entity cleanup to unregister
helpers. That split is incomplete for probe failures that happen after
module initialization but before all entities are registered, so the
module cleanup path now owns the corresponding media entity cleanup.

Patch 2 adds cleanup for the V4L2 async notifier state initialized by
atomisp_csi2_bridge_parse_firmware(), including notifier connection
cleanup on probe failures and notifier unregister on remove.

Changes in v2:
- Rework patch 1 around the module-init cleanup ownership boundary and
  move media_device_cleanup() after module cleanup.
- Add async notifier cleanup as patch 2.

Dawei Feng (2):
  media: atomisp: fix memory leak in atomisp_pci_probe()
  media: atomisp: fix memory leak in
    atomisp_csi2_bridge_parse_firmware()

 .../staging/media/atomisp/pci/atomisp_csi2.c  |  5 +++-
 .../media/atomisp/pci/atomisp_subdev.c        |  9 +++++--
 .../staging/media/atomisp/pci/atomisp_v4l2.c  | 26 ++++++++++++++-----
 3 files changed, 30 insertions(+), 10 deletions(-)

-- 
2.34.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-06-15 15:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-15  7:28 [PATCH v2 0/2] media: atomisp: fix probe memory leaks Dawei Feng
2026-06-15  7:28 ` [PATCH v2 1/2] media: atomisp: fix memory leak in atomisp_pci_probe() Dawei Feng
2026-06-15 11:11   ` Andy Shevchenko
2026-06-15 11:39     ` Dan Carpenter
2026-06-15 12:35       ` Dawei Feng
2026-06-15 13:51         ` Andy Shevchenko
2026-06-15 15:15           ` Dawei Feng
2026-06-15 13:49       ` Andy Shevchenko
2026-06-15 13:53         ` Dan Carpenter
2026-06-15  7:28 ` [PATCH v2 2/2] media: atomisp: fix memory leak in atomisp_csi2_bridge_parse_firmware() Dawei Feng
2026-06-15 11:12   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox