{"id":11815,"url":"https://patchwork.libcamera.org/api/1.1/patches/11815/?format=json","web_url":"https://patchwork.libcamera.org/patch/11815/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210401152926.1216787-1-hiroh@chromium.org>","date":"2021-04-01T15:29:26","name":"[libcamera-devel] android: CameraBuffer: Mark as invalid if cros::CameraBufferManager::Register() fails","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"c1e4558d03e1ba595b579d363457c8416f894756","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/1.1/people/63/?format=json","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/11815/mbox/","series":[{"id":1879,"url":"https://patchwork.libcamera.org/api/1.1/series/1879/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1879","date":"2021-04-01T15:29:26","name":"[libcamera-devel] android: CameraBuffer: Mark as invalid if cros::CameraBufferManager::Register() fails","version":1,"mbox":"https://patchwork.libcamera.org/series/1879/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/11815/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/11815/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C896BC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  1 Apr 2021 15:30:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 44C636877C;\n\tThu,  1 Apr 2021 17:30:12 +0200 (CEST)","from mail-pf1-x430.google.com (mail-pf1-x430.google.com\n\t[IPv6:2607:f8b0:4864:20::430])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5FE7A6877C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  1 Apr 2021 17:30:11 +0200 (CEST)","by mail-pf1-x430.google.com with SMTP id 11so17564pfn.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 01 Apr 2021 08:30:11 -0700 (PDT)","from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:2:908:1da:b07c:32bc])\n\tby smtp.gmail.com with ESMTPSA id\n\td1sm6172739pjc.24.2021.04.01.08.29.49\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 01 Apr 2021 08:30:08 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"VPwF7eBF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; h=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=bra4RlgrIiGjhepP/qVdlpFSAIQoA0wQCSLQPqZHYJU=;\n\tb=VPwF7eBFCqmso7kV2ydUcZOjXFO1tWxNBIoVq+xMXNi1UYFnDwPsk9fOoavgUpo0YL\n\t+MhrpS53+6dAc1amhKBF58QL4J8a6IldRq1WFeJVpNc0AOmkxoV6dApRENMGEko63cdU\n\tiw15jYN97lhCmZnVgSDGDN7azgLGloa7qMQQ0=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=bra4RlgrIiGjhepP/qVdlpFSAIQoA0wQCSLQPqZHYJU=;\n\tb=i6YjkbxbcFqZaFWYrgtv6wWVSpbjFfTuSYXg3Q8tyGPB0enyn7T45YV/WUM/HXJDM1\n\t734nkS3SPDJDTs69HyMbFAFi9UF4JRB2DtM8YXBUJS50WHH44bbjyu8VR902RS+Whf+u\n\tbEs3hQUdBprU1vxoMaiyI0jujUfrU/MrrDMOE4Zv6EdA8rr45CJyO96Q+pHRlOM+wltG\n\thnoeE9ddEMt8VIkshz8v1h3eRnFmebl24AnFCSijnrxbnuQ4cT6E9ewDQcGKHa8Ppabs\n\t/y7tYoWwFU3pQSq3VRlFHX8kIpzDB+BRdSb7+URki4FACBYSk3skkzDT8AohdcM6dj2b\n\thVKw==","X-Gm-Message-State":"AOAM531RwKJInwezIaB7ie6mXyJvi3wF/K3A3b6IaSBX/mdH0nkLWZHe\n\tQNSc6xY0+4pmMIvDwYtitDRCJMn/+p2T4Q==","X-Google-Smtp-Source":"ABdhPJwEy0Oy6Y7+rb6a/tcbIveixDfguOvTYeMimDoSHQm0dn1jMwPy30CIspx2lWGKkM4RdAN7Xw==","X-Received":"by 2002:a05:6a00:3:b029:1f3:1959:2e3b with SMTP id\n\th3-20020a056a000003b02901f319592e3bmr7887221pfk.11.1617291009288; \n\tThu, 01 Apr 2021 08:30:09 -0700 (PDT)","From":"Hirokazu Honda <hiroh@chromium.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri,  2 Apr 2021 00:29:26 +0900","Message-Id":"<20210401152926.1216787-1-hiroh@chromium.org>","X-Mailer":"git-send-email 2.31.0.291.g576ba9dcdaf-goog","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH] android: CameraBuffer: Mark as invalid if\n\tcros::CameraBufferManager::Register() fails","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"cros::CameraBufferManager::Register() fails if a buffer handle\nis invalid. We should mark CameraBuffer as invalid on the failure\nof Register().\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/android/mm/cros_camera_buffer.cpp | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)","diff":"diff --git a/src/android/mm/cros_camera_buffer.cpp b/src/android/mm/cros_camera_buffer.cpp\nindex 7df4f47c..d9fd43b7 100644\n--- a/src/android/mm/cros_camera_buffer.cpp\n+++ b/src/android/mm/cros_camera_buffer.cpp\n@@ -53,7 +53,11 @@ CameraBuffer::Private::Private(CameraBuffer *cameraBuffer,\n {\n \tbufferManager_ = cros::CameraBufferManager::GetInstance();\n \n-\tbufferManager_->Register(camera3Buffer);\n+\tint ret = bufferManager_->Register(camera3Buffer);\n+\tif (ret) {\n+\t\tLOG(HAL, Error) << \"Failed registering a buffer: \" << ret;\n+\t\treturn;\n+\t}\n \n \tnumPlanes_ = bufferManager_->GetNumPlanes(camera3Buffer);\n \tswitch (numPlanes_) {\n","prefixes":["libcamera-devel"]}