get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2222705,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2222705/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260413134345.2855417-1-lgs201920130244@gmail.com/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20260413134345.2855417-1-lgs201920130244@gmail.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260413134345.2855417-1-lgs201920130244@gmail.com/",
    "date": "2026-04-13T13:43:44",
    "name": "[v2] bus: fsl-mc: Fix refcount leak in fsl_mc_device_add() error path",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2265ebb2c5843863853ccc7ab3f9b088a31da875",
    "submitter": {
        "id": 91722,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/91722/?format=api",
        "name": "Guangshuo Li",
        "email": "lgs201920130244@gmail.com"
    },
    "delegate": {
        "id": 61610,
        "url": "http://patchwork.ozlabs.org/api/1.2/users/61610/?format=api",
        "username": "chleroy",
        "first_name": "Christophe",
        "last_name": "Leroy",
        "email": "christophe.leroy@c-s.fr"
    },
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260413134345.2855417-1-lgs201920130244@gmail.com/mbox/",
    "series": [
        {
            "id": 499707,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/499707/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=499707",
            "date": "2026-04-13T13:43:44",
            "name": "[v2] bus: fsl-mc: Fix refcount leak in fsl_mc_device_add() error path",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/499707/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2222705/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2222705/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-19695-incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=G3B9BuKW;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-19695-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "lists.ozlabs.org;\n arc=none smtp.remote-ip=\"2607:f8b0:4864:20::42f\"",
            "lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=G3B9BuKW;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com\n (client-ip=2607:f8b0:4864:20::42f; helo=mail-pf1-x42f.google.com;\n envelope-from=lgs201920130244@gmail.com; receiver=lists.ozlabs.org)"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org\n [IPv6:2404:9400:21b9:f100::1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1 raw public key)\n server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvTCX2rRJz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 23:44:07 +1000 (AEST)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fvTCW383bz2yjq;\n\tMon, 13 Apr 2026 23:44:07 +1000 (AEST)",
            "from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com\n [IPv6:2607:f8b0:4864:20::42f])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4fvTCT5fgVz2yS9\n\tfor <linuxppc-dev@lists.ozlabs.org>; Mon, 13 Apr 2026 23:44:04 +1000 (AEST)",
            "by mail-pf1-x42f.google.com with SMTP id\n d2e1a72fcca58-82d0b68837aso2385986b3a.2\n        for <linuxppc-dev@lists.ozlabs.org>;\n Mon, 13 Apr 2026 06:44:04 -0700 (PDT)",
            "from lgs.. ([2409:893d:1188:142d:6c67:74e8:5200:1f39])\n        by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82f0c33de57sm10951065b3a.21.2026.04.13.06.43.57\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Mon, 13 Apr 2026 06:44:01 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1776087847;\n\tcv=none;\n b=REK5Y30GbvHaNkpLcb1yrpdv57vJ8xHSK+5KdC0vTR8NHT0Sz2KLxFyLIR9jmqmjsW+c6sWMOxSHI8KrYLlIePOkNZryEOArQCdDZOsTN6aActJlYu/GrPGUlv9tYy1FReH/6RoZI/pDry+m9ccqFyaSYbZHBBqDzVRNv9PvO9OGDKSIDm7rta5AXrHVemGGehH2LKkkkRmkhM31HUMpMoMQ+L+sd9eSnWtcLKE5ZOeVvPM0UcHla0KxlGFFXSpYk1ta45PuE2lISOe7hKOQBp79tSLYC2o2Pel3vH+Vuok577SNWTBhF7/Y3Pt+bE/9vkrlRHbIHNahYw/gFgOD0A==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1776087847; c=relaxed/relaxed;\n\tbh=7W9JynenGbsWsUxegkWWGHkXpA2s8st+nPT0ylLSYvw=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=SZlOMexARewB9zam84DFn8D7rTlfHxa/Usnk0FRw7SyTY9yfDUTkV0bXgWOFUK8PqoCoou9WARkB77yh83HWi5YsfNiv0glfMOv3dRRvtGMVAy017vtlOngHcEXznUvT2QN8dL3ZX6x0F1BZsynNr9Id9purM0oq1yNDbhOqN2tv3u2UufcLtn+u8cI3yKobbcNOiVCwKcUOVsFok5fRKy6PNh+PDef5mCnDf0kwVU7KcpQ2S9asQLUUyHacShaiQgCku0gerLoH2eeRESvRL1ZwJwCqyfLV4Yd+w8KyS1K/YqNpi4AcY9eSsN9ZLg5GSCiRf3CxHHrpxerToD1GBw==",
        "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com; dkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=G3B9BuKW; dkim-atps=neutral;\n spf=pass (client-ip=2607:f8b0:4864:20::42f; helo=mail-pf1-x42f.google.com;\n envelope-from=lgs201920130244@gmail.com;\n receiver=lists.ozlabs.org) smtp.mailfrom=gmail.com",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776087842; x=1776692642;\n darn=lists.ozlabs.org;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:from:to:cc:subject:date:message-id:reply-to;\n        bh=7W9JynenGbsWsUxegkWWGHkXpA2s8st+nPT0ylLSYvw=;\n        b=G3B9BuKWOeu9lL5ex9PmD/VoUCs3VrKvPqXtw9LbAN5/dq9mkHawnLh3Q6uEAmapBX\n         wbJKV/FRA6IIbVkXYl6oMgP4eEnJZ73vSUzKj4xVSMWXoiMx50oFHwu4gpAVFkAWjJDg\n         bGmyb8Rgw++aGP6igQex5JQZ2QZNq2aHrQzyXdzsS4uZsREK1dcwk0WOtxST8zHdUxiA\n         C6XsZFShsSXhALGT/48EBrV5e0f8+fhy0jSN6SUlxOtvrmrl7TbQqPqmc0iqqk9OyUDs\n         dHen1TrzXJAitRPpQO7YdvebnhOJ74NjLh3mOdQcw5HeS/XfDvU7hPhlFckguEIP0akH\n         yz6w==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776087842; x=1776692642;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=7W9JynenGbsWsUxegkWWGHkXpA2s8st+nPT0ylLSYvw=;\n        b=dLEu4DqistSV31B7mCuNCsrspHbdQ6ZWECaIdHwXmasCC2s3eE3yQksrFWo7ctnlhH\n         k03suM7N+6Gb2Gd14AjtxGMu/kkSRbDrvovUBE4yroalNK7qXw65UBi47o7hSrilfELh\n         RHilc6USCqzBB1Gck3fnDk70nJnyNEz4ltVySfH8F6S/j4PCAwQEoDICS/VtQizp9nvr\n         v3TGapTEJfy3RyYED3PL9lzDDoJpYcozenEvKYg/589BNTn+llb1cjAl4/5WaGIAei79\n         Yup3DraCWhD1z2E3ssEIVbGTlt4A7mPeUakvzDH6ww+4IlYXgcRX7px9q63PgSaTLKkp\n         /0ww==",
        "X-Forwarded-Encrypted": "i=1;\n AFNElJ97bQE70UKtA+1ozjYpjVFrcfPaARanYJex/WwYEtrWvIxHErpVZOuxgI/LyKsPAmCFHNX5TZSOMXfNOU8=@lists.ozlabs.org",
        "X-Gm-Message-State": "AOJu0YxnTMhMFod5/ZoFO9wk49kQEHbsRzixwi6QjeMaeZl51Po3/qru\n\tnUI+F1C4TWY9Hs7OhjmE7pu0EV79FTOtwT+QlT9bzeeSwKzQY8pULzjm",
        "X-Gm-Gg": "AeBDievBknziV2Wa7TCRLhwppZ5jkMsTWVZTbxGbGY4tHt7nXxvppViHGJpYW93Pgpx\n\taK0a9TTuTqYHV1hOkN20FCuwksy6QwMWA0LxBrJV0HbRjd5nLgpJYNFLvMuDEvCVMlST4tiO5Qm\n\ttcDKo9JzlB3y6vFT/eFZfSMLSGSN8q/IvO6itolDhzmy73Py0w724+nzVNxhGAXON4ewRi3qJoJ\n\tq2CmEV+BoWtkCmAuBIuA5zl81/Pe7juVzZo05VUNl9kYq3xDMmSbN9BMFRVmnI1xPD4cixN+TAF\n\tAQGFO9AKg7EayjOSTw5dhabNnQftflTMB28IBZv82hHTh/0Hakd7WqN4LXN6dTAH5/EUnVW3Y9g\n\tXmyZCiuQbtAM98UzW2sSEsTN0oT3ZSxNQEuyh6b8OESoeSF606rMDZlC/Ly+FIVv3gjmUfNKd6i\n\tHqc2Go6s+mLBzH7hFiwwXWGBv4dIAzpSA=",
        "X-Received": "by 2002:a05:6a00:aa09:b0:81e:d18a:489d with SMTP id\n d2e1a72fcca58-82f0c324ad0mr13936407b3a.42.1776087841672;\n        Mon, 13 Apr 2026 06:44:01 -0700 (PDT)",
        "From": "Guangshuo Li <lgs201920130244@gmail.com>",
        "To": "Ioana Ciornei <ioana.ciornei@nxp.com>,\n\tStuart Yoder <stuart.yoder@freescale.com>,\n\tGreg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\tAlexander Graf <agraf@suse.de>,\n\t\"J. German Rivera\" <German.Rivera@freescale.com>,\n\tlinuxppc-dev@lists.ozlabs.org,\n\tlinux-kernel@vger.kernel.org",
        "Cc": "Guangshuo Li <lgs201920130244@gmail.com>,\n\tstable@vger.kernel.org",
        "Subject": "[PATCH v2] bus: fsl-mc: Fix refcount leak in fsl_mc_device_add()\n error path",
        "Date": "Mon, 13 Apr 2026 21:43:44 +0800",
        "Message-ID": "<20260413134345.2855417-1-lgs201920130244@gmail.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "X-Mailing-List": "linuxppc-dev@lists.ozlabs.org",
        "List-Id": "<linuxppc-dev.lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev+help@lists.ozlabs.org>",
        "List-Owner": "<mailto:linuxppc-dev+owner@lists.ozlabs.org>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Archive": "<https://lore.kernel.org/linuxppc-dev/>,\n  <https://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Subscribe": "<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>",
        "List-Unsubscribe": "<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>",
        "Precedence": "list",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Spam-Status": "No, score=0.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tDKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,\n\tFROM_LOCAL_DIGITS,FROM_LOCAL_HEX,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,\n\tSPF_PASS autolearn=disabled version=4.0.1 OzLabs 8",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"
    },
    "content": "After device_initialize(), the lifetime of the embedded struct device\nis expected to be managed through the device core reference counting.\n\nIn fsl_mc_device_add(), all failures after device_initialize() jump to\nerror_cleanup_dev, where mc_dev and its associated resources are freed\ndirectly instead of releasing the device reference with\nput_device(&mc_dev->dev). This bypasses the normal device lifetime\nrules and may leave the reference count of the embedded struct device\nunbalanced, resulting in a refcount leak.\n\nThe issue was identified by a static analysis tool I developed and\nconfirmed by manual review.\n\nFix this by using put_device(&mc_dev->dev) in the error path and let\nfsl_mc_device_release() handle the final cleanup.\n\nFixes: bbf9d17d9875 (\"staging: fsl-mc: Freescale Management Complex (fsl-mc) bus driver\")\nCc: stable@vger.kernel.org\nSigned-off-by: Guangshuo Li <lgs201920130244@gmail.com>\n---\nv2:\n  - note that the issue was identified by my static analysis tool\n  - and confirmed by manual review\n\n drivers/bus/fsl-mc/fsl-mc-bus.c | 6 +-----\n 1 file changed, 1 insertion(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c\nindex 25845c04e562..6d132144ce25 100644\n--- a/drivers/bus/fsl-mc/fsl-mc-bus.c\n+++ b/drivers/bus/fsl-mc/fsl-mc-bus.c\n@@ -905,11 +905,7 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc,\n \treturn 0;\n \n error_cleanup_dev:\n-\tkfree(mc_dev->regions);\n-\tif (mc_bus)\n-\t\tkfree(mc_bus);\n-\telse\n-\t\tkfree(mc_dev);\n+\tput_device(&mc_dev->dev);\n \n \treturn error;\n }\n",
    "prefixes": [
        "v2"
    ]
}