Patch Detail
Show a patch.
GET /api/patches/701/?format=api
{ "id": 701, "url": "https://patchwork.libcamera.org/api/patches/701/?format=api", "web_url": "https://patchwork.libcamera.org/patch/701/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20190304232530.4427-2-kieran.bingham@ideasonboard.com>", "date": "2019-03-04T23:25:29", "name": "[libcamera-devel,1/2] libcamera: v4l2_device: Close Plane dmabuf fd", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "3fc9b030127368e6e7d7019eac0015bb73563721", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/701/mbox/", "series": [ { "id": 202, "url": "https://patchwork.libcamera.org/api/series/202/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=202", "date": "2019-03-04T23:25:29", "name": "libcamera: Fix unmapping of buffers", "version": 1, "mbox": "https://patchwork.libcamera.org/series/202/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/701/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/701/checks/", "tags": {}, "headers": { "Return-Path": "<kieran.bingham@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 667B6611A2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 5 Mar 2019 00:25:37 +0100 (CET)", "from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E4C34322;\n\tTue, 5 Mar 2019 00:25:36 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1551741937;\n\tbh=UZhZ6VNetcFDXQvCB2eHdc2R0StuH2/jONUwm+yGUlk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=YaDxY1cHdggoxRbCCCgPbsBFitKnl5HWdlOn1Zo48yoiAO4ZZZjSb7QvkdHh663Ks\n\tGczEsZbcNLwt+4RxY3deDPy7UFFjWOL0A2Gi1nvXbB+TW1TkBNzl5huf23WHj3cBdA\n\tix0Tx1AAk7VnGxKNE0l9QifJYXwOQKnOoeVlaupA=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "LibCamera Devel <libcamera-devel@lists.libcamera.org>", "Date": "Mon, 4 Mar 2019 23:25:29 +0000", "Message-Id": "<20190304232530.4427-2-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.19.1", "In-Reply-To": "<20190304232530.4427-1-kieran.bingham@ideasonboard.com>", "References": "<20190304232530.4427-1-kieran.bingham@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 1/2] libcamera: v4l2_device: Close Plane\n\tdmabuf fd", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.23", "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>", "X-List-Received-Date": "Mon, 04 Mar 2019 23:25:38 -0000" }, "content": "When constructing a Plane, the exported buffer provides a dmabuf handle which\nis set to the Plane object.\n\nThis action duplicates the handle for internal storage, and the original fd is\nnot used and needs to be closed.\n\nClose the handle, ensuring that the resources can be correctly managed.\n\nFixes: 771befc6dc0e (\"libcamera: v4l2_device: Request buffers from the device\")\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/v4l2_device.cpp | 1 +\n 1 file changed, 1 insertion(+)", "diff": "diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 0cd9f4b8e178..a88a5f5ff036 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -676,6 +676,7 @@ int V4L2Device::createPlane(Buffer *buffer, unsigned int planeIndex,\n \tbuffer->planes().emplace_back();\n \tPlane &plane = buffer->planes().back();\n \tplane.setDmabuf(expbuf.fd, length);\n+\t::close(expbuf.fd);\n \n \treturn 0;\n }\n", "prefixes": [ "libcamera-devel", "1/2" ] }