Show a patch.

GET /api/patches/22838/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 22838,
    "url": "https://patchwork.libcamera.org/api/patches/22838/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22838/",
    "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": "<20250224011934.23818-1-laurent.pinchart@ideasonboard.com>",
    "date": "2025-02-24T01:19:34",
    "name": "libcamera: delayed_controls: Inherit from Object class",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "96f657e58ea86a7cd52b8e507e3bec83edcda28c",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/22838/mbox/",
    "series": [
        {
            "id": 5013,
            "url": "https://patchwork.libcamera.org/api/series/5013/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5013",
            "date": "2025-02-24T01:19:34",
            "name": "libcamera: delayed_controls: Inherit from Object class",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5013/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22838/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22838/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 90BC6C32A9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Feb 2025 01:19:56 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C9B39686BE;\n\tMon, 24 Feb 2025 02:19:55 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3931F61855\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Feb 2025 02:19:52 +0100 (CET)",
            "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CBDCA7EA;\n\tMon, 24 Feb 2025 02:18:25 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Jc1xW3ih\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1740359906;\n\tbh=BK8vo+TlYv200PQ45GHyILxc5FC+Z4ye3zrSHhTTuP8=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=Jc1xW3ihzKuoXS/l2icRM5SOCj7581r2IjwDxfZecM85CFluuHXe/QiUE0ArslTDw\n\tZl+ldAo5BTP105olbQ0nQ2JZqABXaj+Y7kXc4uuLEpty6esd943MfTQefwmMI8ntwg\n\tc8mDuVvyskK3mM9fKDw/bXrGtdIwZ3B+t32EnIbY=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>",
        "Subject": "[PATCH] libcamera: delayed_controls: Inherit from Object class",
        "Date": "Mon, 24 Feb 2025 03:19:34 +0200",
        "Message-ID": "<20250224011934.23818-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.45.3",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "A second use-after-free bug related to signals staying connected after\nthe receiver DelayedControls instance gets deleted has been found, this\ntime in the simple pipeline handler. Fix the issue once and for all by\nmaking the DelayedControls class inherit from Object. This will\ndisconnect signals automatically upon deletion of the receiver.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\nStan, would you be able to test this with the simple pipeline handler ?\nIt should work both with and without your series that deals with the\nframe start signal, and should fix the crash that Kieran has reported.\n\n include/libcamera/internal/delayed_controls.h | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\n\nbase-commit: d476f8358be1536d4edd680c6024f784ff022f5d\n--\nRegards,\n\nLaurent Pinchart",
    "diff": "diff --git a/include/libcamera/internal/delayed_controls.h b/include/libcamera/internal/delayed_controls.h\nindex e8d3014d92cb..b64d8bba7cf7 100644\n--- a/include/libcamera/internal/delayed_controls.h\n+++ b/include/libcamera/internal/delayed_controls.h\n@@ -10,13 +10,15 @@\n #include <stdint.h>\n #include <unordered_map>\n\n+#include <libcamera/base/object.h>\n+\n #include <libcamera/controls.h>\n\n namespace libcamera {\n\n class V4L2Device;\n\n-class DelayedControls\n+class DelayedControls : public Object\n {\n public:\n \tstruct ControlParams {\n",
    "prefixes": []
}