From patchwork Fri Apr 2 02:12:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11820 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id EFC61BD695 for ; Fri, 2 Apr 2021 02:12:48 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 623B968783; Fri, 2 Apr 2021 04:12:48 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="l63W4Jqh"; dkim-atps=neutral Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EE75768780 for ; Fri, 2 Apr 2021 04:12:46 +0200 (CEST) Received: by mail-pl1-x62f.google.com with SMTP id o2so1912922plg.1 for ; Thu, 01 Apr 2021 19:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Wj0YixN5cLlScpV1kHQzMGfcojxIhzRi2ocHAngWQas=; b=l63W4JqhxWFTzG6CDyDTH9johWURB3a/4OZHYO/ngVa6IeJC0R+SiwanOTRZyT4UIl KBuobh75NOd/l0Gxum/3Z2EjbPVgLc+6CBMG/s2YqCSX/177JJZbCWyZ1AHObn6s++u3 eIW/U9hojnJR0HyZSHfS8KiXmtlAQ68sXduE4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Wj0YixN5cLlScpV1kHQzMGfcojxIhzRi2ocHAngWQas=; b=E9lbP0+IogMQenAxZzIw4LHnOkO9nWN/or0bN0BUnzchPZ1uZGbkR4N3ZGD5kA6FmS 8A62lmwq9c1OJErYjDhP/HpacOaJM4rbm2YsbrghwU7UVic1NtNTtHE9+Vwj69k70XZ4 BQ/1lGUek8yTu+wmu9CjW7fykTMFeTqp/CMgQAlGNB/lc+zQ0TxrlgXXjNhKlJfEnsen WIEPqTBy6p8jRhCvAZ3aSYQnknq8icktY2ETIqfOeX+y5zj3xoEbTsQBclhDrdb7DXx1 ttMY5Fv5BWb57MGwbkLHAAEdX0ZBDpaCbHycTsfI4q3E/G1Dzgi12lg3PCuBU85GtPBm nwMw== X-Gm-Message-State: AOAM5301Yi+etpcnXpIPQni4bDDOwe3j3eFARW+Y8WBz5x3AOU5DoQLx Ng/7eIFuQKGQYOIW2U/92CHl5bHIaXyVLA== X-Google-Smtp-Source: ABdhPJz1DFnn4E+hskt4OlN+dmQRNwlmcXxm+f3x9MjEQ/r9iwL0NrSuDzlyu6VBMVVyV2dQ4NtG1Q== X-Received: by 2002:a17:90b:1c0c:: with SMTP id oc12mr11327566pjb.109.1617329565423; Thu, 01 Apr 2021 19:12:45 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:908:1da:b07c:32bc]) by smtp.gmail.com with ESMTPSA id p4sm86902pjk.57.2021.04.01.19.12.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 19:12:45 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Apr 2021 11:12:36 +0900 Message-Id: <20210402021238.1297591-1-hiroh@chromium.org> X-Mailer: git-send-email 2.31.0.208.g409f899ff0-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 0/2] Fix Camera3RequestDescriptor leakage X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This enables CameraDevice to retain the leakage of Camera3RequestDescriptor. Change in v3: - Add CameraDevice::stop(). - Fix the style error in patch 1. Change in v5: - Add mutext to protect descriptors_ because processCaptureRequest() and requestComplete() runs on different threads. Hirokazu Honda (2): android: CameraDevice: Add stop() android: CameraDevice: Fix Camera3RequestDescriptor leakage src/android/camera_device.cpp | 102 ++++++++++++++++++++-------------- src/android/camera_device.h | 13 ++++- src/android/camera_worker.cpp | 4 +- src/android/camera_worker.h | 2 +- 4 files changed, 74 insertions(+), 47 deletions(-) --- 2.31.0.208.g409f899ff0-goog