get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2224498,
    "url": "http://patchwork.ozlabs.org/api/patches/2224498/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/44a4ae53ec2825816b816c85cd378430d9a95cc6.1776429882.git.mnencia@kcore.it/",
    "project": {
        "id": 28,
        "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api",
        "name": "Linux PCI development",
        "link_name": "linux-pci",
        "list_id": "linux-pci.vger.kernel.org",
        "list_email": "linux-pci@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<44a4ae53ec2825816b816c85cd378430d9a95cc6.1776429882.git.mnencia@kcore.it>",
    "list_archive_url": null,
    "date": "2026-04-17T13:24:37",
    "name": "[v2,2/2] PCI/IOV: Skip VF Resizable BAR restore on read error",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "98bba491e657fe5469b9cddfcbafb67f94b2f602",
    "submitter": {
        "id": 93088,
        "url": "http://patchwork.ozlabs.org/api/people/93088/?format=api",
        "name": "Marco Nenciarini",
        "email": "mnencia@kcore.it"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/44a4ae53ec2825816b816c85cd378430d9a95cc6.1776429882.git.mnencia@kcore.it/mbox/",
    "series": [
        {
            "id": 500338,
            "url": "http://patchwork.ozlabs.org/api/series/500338/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=500338",
            "date": "2026-04-17T13:24:35",
            "name": "PCI: Guard Resizable BAR restore against unreachable devices",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/500338/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2224498/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2224498/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-52725-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-pci@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=kcore.it header.i=@kcore.it header.a=rsa-sha256\n header.s=spark header.b=MnCbf17X;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=linux-pci+bounces-52725-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=kcore.it header.i=@kcore.it header.b=\"MnCbf17X\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=49.13.27.68",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=kcore.it",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=kcore.it"
        ],
        "Received": [
            "from sto.lore.kernel.org (sto.lore.kernel.org\n [IPv6:2600:3c09:e001:a7::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fxwbf2Mqfz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 23:25:02 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 4DD2D3037401\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 13:24:56 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 0B4D43A3E64;\n\tFri, 17 Apr 2026 13:24:49 +0000 (UTC)",
            "from spark.kcore.it (spark.kcore.it [49.13.27.68])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 9622C3A16B4;\n\tFri, 17 Apr 2026 13:24:47 +0000 (UTC)",
            "from mnencia by spark.kcore.it with local (Exim 4.96)\n\t(envelope-from <mnencia@kcore.it>)\n\tid 1wDjBV-007w6I-1I;\n\tFri, 17 Apr 2026 15:24:37 +0200"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776432288; cv=none;\n b=aR/ggDXadbzzg1TBIRsA/TwjOFv3acnTUuN6ROV341KcgV32NsUedPA/VOdqzzziDIJ1SVyQT6ZJe3JU/ohbuIfDRfDNylxlZqmlzZm9hsZh51asemYv8Gw8WADcCWBgmCj8IVLgtUI7Q+LCloMcdrm661iiJqzIk/6xO+6Z53U=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776432288; c=relaxed/simple;\n\tbh=LiqyxA4Fqp3E5PM/AtVrIZtpsvNwmNVzRuiijmPLyWQ=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=MT+t4xhlEXlPI1J/JO6Cp7GuUXS7b3z4+ytreMoKBm9cQN4es8u7EyiKmFq70V2voxe4VuePfPRSoWe8Gamzp6YSDdzkGM1rYv4MlG11XAyrw4rKmBJZJPxCTJt3cwKVZafs4u4ATCMecyFEpZj0YPRe0gKH4s4pCPpnPypiKcQ=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=kcore.it;\n spf=pass smtp.mailfrom=kcore.it;\n dkim=pass (1024-bit key) header.d=kcore.it header.i=@kcore.it\n header.b=MnCbf17X; arc=none smtp.client-ip=49.13.27.68",
        "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kcore.it;\n\ts=spark; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:\n\tIn-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=SXo38i+4gu74nYK9SMz135VuFHiRnpB/1O9Er+Qdjtk=; b=MnCbf17XcrLEfgEFC9OpnFaLzg\n\tDSEjzpzQLsaOr1e2GO5BQEEj2hVEsIdqeX7sZ+d31L4oVTcu9sE3WFRmybjkMqVaiEYfd9nS+b3oa\n\t9RJkYmDDPaTi+mno7dRUKQM2cIuV59dTWarDTJzfVAorxg7NcNcQq1Yq86dLlerVZp20=;",
        "From": "Marco Nenciarini <mnencia@kcore.it>",
        "To": "Bjorn Helgaas <bhelgaas@google.com>,\n\tlinux-pci@vger.kernel.org",
        "Cc": "linux-kernel@vger.kernel.org,\n =?utf-8?q?Christian_K=C3=B6nig?= <ckoenig.leichtzumerken@gmail.com>,\n Marco Nenciarini <mnencia@kcore.it>, stable@vger.kernel.org, =?utf-8?q?Mich?=\n\t=?utf-8?q?a=C5=82_Winiarski?= <michal.winiarski@intel.com>, =?utf-8?q?Ilpo_?=\n\t=?utf-8?q?J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>,\n \"Rafael J . Wysocki\" <rafael@kernel.org>,\n Eric Chanudet <echanude@redhat.com>, Alex Williamson <alex@shazbot.org>,\n Lukas Wunner <lukas@wunner.de>",
        "Subject": "[PATCH v2 2/2] PCI/IOV: Skip VF Resizable BAR restore on read error",
        "Date": "Fri, 17 Apr 2026 15:24:37 +0200",
        "Message-Id": "\n <44a4ae53ec2825816b816c85cd378430d9a95cc6.1776429882.git.mnencia@kcore.it>",
        "X-Mailer": "git-send-email 2.39.5",
        "In-Reply-To": "<cover.1776429882.git.mnencia@kcore.it>",
        "References": "<20260408163922.1740497-1-mnencia@kcore.it>\n <cover.1776429882.git.mnencia@kcore.it>",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-pci@vger.kernel.org",
        "List-Id": "<linux-pci.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "sriov_restore_vf_rebar_state() uses the VF Resizable BAR Control\nregister to decide how many VF BARs to restore (nbars) and which\nVF BAR each iteration addresses (bar_idx). bar_idx indexes into\ndev->sriov->barsz[], which has only PCI_SRIOV_NUM_BARS (6) entries.\n\nWhen the device does not respond, config reads return the all-ones\npattern. Both fields are 3 bits wide, so nbars and bar_idx both\nevaluate to 7. The barsz[] access then goes out of bounds. UBSAN\nreports this as:\n\n  UBSAN: array-index-out-of-bounds in drivers/pci/iov.c:948:51\n  index 7 is out of range for type 'resource_size_t [6]'\n\nObserved on an NVIDIA RTX PRO 1000 GPU (GB207GLM) that fell off the\nPCIe bus during a failed GC6 power state exit. The subsequent\npci_restore_state() invoked sriov_restore_vf_rebar_state() while\nconfig reads returned 0xffffffff, triggering the splat.\n\nBail out if any VF Resizable BAR Control read returns the error\npattern. No further VF BARs are touched, which is safe because a\nconfig read that returns the error pattern indicates the device is\nunreachable and restoration is pointless. This mirrors the guard\nin pci_restore_rebar_state().\n\nFixes: 5a8f77e24a30 (\"PCI/IOV: Restore VF resizable BAR state after reset\")\nCc: stable@vger.kernel.org\nSigned-off-by: Marco Nenciarini <mnencia@kcore.it>\n---\nCc: Michał Winiarski <michal.winiarski@intel.com>\nCc: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>\nCc: Rafael J. Wysocki <rafael@kernel.org>\nCc: Eric Chanudet <echanude@redhat.com>\nCc: Alex Williamson <alex@shazbot.org>\nCc: Lukas Wunner <lukas@wunner.de>\n\n drivers/pci/iov.c | 6 ++++++\n 1 file changed, 6 insertions(+)",
    "diff": "diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c\nindex 91ac4e37ecb9c..08df9bace13d1 100644\n--- a/drivers/pci/iov.c\n+++ b/drivers/pci/iov.c\n@@ -938,12 +938,18 @@ static void sriov_restore_vf_rebar_state(struct pci_dev *dev)\n \t\treturn;\n \n \tpci_read_config_dword(dev, pos + PCI_VF_REBAR_CTRL, &ctrl);\n+\tif (PCI_POSSIBLE_ERROR(ctrl))\n+\t\treturn;\n+\n \tnbars = FIELD_GET(PCI_VF_REBAR_CTRL_NBAR_MASK, ctrl);\n \n \tfor (i = 0; i < nbars; i++, pos += 8) {\n \t\tint bar_idx, size;\n \n \t\tpci_read_config_dword(dev, pos + PCI_VF_REBAR_CTRL, &ctrl);\n+\t\tif (PCI_POSSIBLE_ERROR(ctrl))\n+\t\t\treturn;\n+\n \t\tbar_idx = FIELD_GET(PCI_VF_REBAR_CTRL_BAR_IDX, ctrl);\n \t\tsize = pci_rebar_bytes_to_size(dev->sriov->barsz[bar_idx]);\n \t\tctrl &= ~PCI_VF_REBAR_CTRL_BAR_SIZE;\n",
    "prefixes": [
        "v2",
        "2/2"
    ]
}