[libcamera-devel] [PATCH 0/3] apps: cam: kms: Introduce requests tracking queue
Umang Jain
umang.jain at ideasonboard.com
Sun Apr 23 22:39:28 CEST 2023
This series got formed while I was trying to stress test the KMSSink
with start() -> stop() -> configure() -> start() -> stop() ...
cycles (without re-allocating).
Mainly, I faced a use-after-free segmentation fault happening on stop().
It was due the fact a DRM request completes asynchronous but current
KMSSink::stop() will free that DRM request(stored in queued_ member) on
stop() - which isn't right. A queue is introduced to store requests but
mark pending requests as 'expired' on stop() (3/3)
Patch (1/3) and Patch (2/3) are drive by fixes.
Umang Jain (3):
apps: cam: kms_sink: Do not process requests after stop()
apps: cam: kms_sink: Drop unique_ptr<> from DRM::AtomicRequest
apps: cam: kms_sink: Introduce a requests tracking queue
src/apps/cam/kms_sink.cpp | 90 +++++++++++++++++++++------------------
src/apps/cam/kms_sink.h | 11 +++--
2 files changed, 56 insertions(+), 45 deletions(-)
--
2.39.1
More information about the libcamera-devel
mailing list