[0/3] libcamera: atomic-disconnects
mbox series

Message ID 20261123-kbingham-atomic-disconnects-v1-0-0b251be0bb3e@ideasonboard.com
Headers show
Series
  • libcamera: atomic-disconnects
Related show

Message

Kieran Bingham Nov. 23, 2026, 5:47 p.m. UTC
Disconnecting a camera while it's running can cause races and crashes if
the stream isn't stopped correctly.

Fix a data race, and provide an assertion to make sure behaviour is
consistent, and that the application can clean up accordingly by calling
stop() successfully after disconnected.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
Barnabás Pőcze (1):
      libcamera: camera: Make `disconnected_` atomic

Stefan Klug (2):
      libcamera: pipeline_handler: Add an assertion to detect bad synchronization
      libcamera: pipeline_handler: Allow calling stop() on a disconnected camera

 include/libcamera/internal/camera.h |  6 ++++--
 src/libcamera/camera.cpp            | 31 ++++++++++++++-----------------
 src/libcamera/pipeline_handler.cpp  | 11 +++++++++++
 3 files changed, 29 insertions(+), 19 deletions(-)
---
base-commit: adfa719f8ed67d18fd8a0739fc088a1f8b9e7252
change-id: 20261123-kbingham-atomic-disconnects-826090b8596f

Best regards,