get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2219770,
    "url": "http://patchwork.ozlabs.org/api/patches/2219770/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260404-fix_pci_access-v1-2-416f32c6f7ec@oss.qualcomm.com/",
    "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": "<20260404-fix_pci_access-v1-2-416f32c6f7ec@oss.qualcomm.com>",
    "list_archive_url": null,
    "date": "2026-04-04T08:53:00",
    "name": "[2/2] PCI: Fix NULL pointer access in pci_store_saved_state()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "a19afea3dda84c1c69d560b1f2255cba0ca4f7b0",
    "submitter": {
        "id": 89908,
        "url": "http://patchwork.ozlabs.org/api/people/89908/?format=api",
        "name": "Krishna Chaitanya Chundru",
        "email": "krishna.chundru@oss.qualcomm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260404-fix_pci_access-v1-2-416f32c6f7ec@oss.qualcomm.com/mbox/",
    "series": [
        {
            "id": 498709,
            "url": "http://patchwork.ozlabs.org/api/series/498709/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=498709",
            "date": "2026-04-04T08:52:58",
            "name": "PCI: Fix NULL pointer access in pci_store_saved_state()",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498709/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2219770/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2219770/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-51870-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=pass (2048-bit key;\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=m70sZ2tN;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=iJfLKY3w;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-51870-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com\n header.b=\"m70sZ2tN\";\n\tdkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=\"iJfLKY3w\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=205.220.180.131",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=oss.qualcomm.com"
        ],
        "Received": [
            "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::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 4fnqGl2kKLz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 04 Apr 2026 19:57:19 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 74EFE306B4E9\n\tfor <incoming@patchwork.ozlabs.org>; Sat,  4 Apr 2026 08:53:18 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 347C51FF7C8;\n\tSat,  4 Apr 2026 08:53:18 +0000 (UTC)",
            "from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com\n [205.220.180.131])\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 9B60F3126D6\n\tfor <linux-pci@vger.kernel.org>; Sat,  4 Apr 2026 08:53:16 +0000 (UTC)",
            "from pps.filterd (m0279873.ppops.net [127.0.0.1])\n\tby mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 6340KOiv1310266\n\tfor <linux-pci@vger.kernel.org>; Sat, 4 Apr 2026 08:53:15 GMT",
            "from mail-pl1-f200.google.com (mail-pl1-f200.google.com\n [209.85.214.200])\n\tby mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dar0mgs0f-1\n\t(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n\tfor <linux-pci@vger.kernel.org>; Sat, 04 Apr 2026 08:53:15 +0000 (GMT)",
            "by mail-pl1-f200.google.com with SMTP id\n d9443c01a7336-2b0b57e192bso20248635ad.1\n        for <linux-pci@vger.kernel.org>; Sat, 04 Apr 2026 01:53:15 -0700 (PDT)",
            "from hu-krichai-hyd.qualcomm.com ([202.46.23.25])\n        by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b2749e2e97sm106883085ad.82.2026.04.04.01.53.11\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Sat, 04 Apr 2026 01:53:13 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775292798; cv=none;\n b=HdFXPlns7xZ5jjGuS6J8B/1HrJSAl3eb7fLY3aWqrU/m5EU0PasPjYjld4/opHdJCMISc7kVA+tIoibLJNzrRey4J8nDYKG/Y3i0I4oPdOjRNlcByFh9aEG0l+Jfc+aIZK6e10w34coF2qd7+D7Lfx504ZfTgCvjYtPn2gaGsVg=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775292798; c=relaxed/simple;\n\tbh=9OJ4UNKQcRb8Ws8QLo61/dvK/QzgaBZThrXn5UYtEf8=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=e00D5Avzrltan31DXgDQ0ltjrPDGxMgRNqlrh0ymFm76dWi9RiskZBFVw6BZcjhITXyFu2iIumYgPYU8WTrVCecLIpJRLcbU5k1pt737Dd+j1v8in4UiPJ65OPgBA+Iki40YW1UIpvBPWDzlTuiTZSX9vSf35+2brhFXQeuwvHM=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com;\n spf=pass smtp.mailfrom=oss.qualcomm.com;\n dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com\n header.b=m70sZ2tN;\n dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=iJfLKY3w; arc=none smtp.client-ip=205.220.180.131",
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n\tcc:content-transfer-encoding:content-type:date:from:in-reply-to\n\t:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=\n\teuurnDdp2gg95lsunKzyUav3a4dM9U326nl7pdJ2T68=; b=m70sZ2tN0SNU37Zx\n\tLwlhVXTw8AEzLK6eDxWuy8FKGfignt3zfYfb8EgicZDPXmVGi43xJUfnRGfap0iK\n\toAgPobK6Ix8Igb0LfcjBRcG4GG5X94cr91Q7YOGn1ncnZ1nSY8X1ak6nMvqKe/XP\n\tIeDPnLZQ6OwUZ16ODSSE7F2x3EpY/gbIMy8xAqvISQ/qr4eYfS+zUrrVbDCIosPt\n\t64TyLsVl3o4vSGzya/x46Gvr75pGvrVOwB2lAq9SuRGbMaeAP7DPYDW/UkHP512R\n\tTxM6L/Y/OPtP+UiREgRHvrq+ZK07SCgd2NX32Xc0zQyJ+Prdh1+XWOyuYxZLRJ3I\n\t75hxsQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=oss.qualcomm.com; s=google; t=1775292794; x=1775897594;\n darn=vger.kernel.org;\n        h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n         :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n         :reply-to;\n        bh=euurnDdp2gg95lsunKzyUav3a4dM9U326nl7pdJ2T68=;\n        b=iJfLKY3waIjvvJgHDFHO2itJp7X/Pk28sMAyjE0Qf7pPVI9mlqggLdgTPkod3gNVZl\n         YZaQFzuo0hcP0ZFCQNiyQCiyIBtcDBgCSKeqHjvP0u+kRLUIS95o6lDNhoHgn0scWQSu\n         EZ9oxPgfLOoco6bVv7/EkM8sCI6sPd+7K1ZuMlqGUsncp5vEs4OtH9A3WYyhrTqjFjLE\n         lUqAfUi4Nx3kxORgKJ9LeQg3bb0SCaAiORz5zOPnwmXbGANs054xCK+dgZnPGoF3mZaR\n         PWE/WT9OQkhxh7maa+m3bf+aGNBJFdQjk/8BKwClB49g9PIEFZlALYuPWJpq/tg7Rp13\n         R3PQ=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775292794; x=1775897594;\n        h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n         :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n         :cc:subject:date:message-id:reply-to;\n        bh=euurnDdp2gg95lsunKzyUav3a4dM9U326nl7pdJ2T68=;\n        b=oIw3X0z+hDCBO6+8i/HTFi/aRd2T9MQvpQFpfPqP0n/YS5fkIPT1ip8gwJFZJrrCzg\n         rYKQ2sJmFkaqvHOUXySrRVRlRAIcRidtxEd6MyEsLlCQd2/4yZvH9+EBstTtqa+KBOz6\n         rV3yPwuw3S95mwJK/Xcx8xb4HhzLShVkLCc9k5C60qG7X6GB8LlB8Ci7HaPsp8MBFnz2\n         aftSJrf0Od8iBYXYwzS+Og2LdujPIzGhkt2GJzp7OCZWfuNhQHtBdaU8mCXd/lUhJJL2\n         0QuHHzHEapZmoE0vc40B3VK9I8txNo2lPwFpoSJJ7ZNeHlkWbwg+UMIQljn8wrWjhLBE\n         zhCA==",
        "X-Gm-Message-State": "AOJu0YztStLANggryTVvocOjVAAxQK610DjkfgPk132CqoHshs1R3OT4\n\t0eijkGQAQlHvq2+bawQkdjCIHNE4mGGR7I1aT0wyj9SoVT2kZNKly4u6+Rh08jbZ3M5xlBdXM/E\n\tY2OE3A/TN4S211FgNqGUr2YtBN1LWhwmaxPcvqt13ZLIBA60BSQyH/1cIib2zIlPlQaqAKJo=",
        "X-Gm-Gg": "AeBDietJuFVdw+TSHhuzpINdL00ZETixPlEi33vkHirjXcpbgrcokLK8DPfr29HpsvS\n\tvhjzi3nKw56P63HRE59TcX0eEuidjhL5QHkeYCAkGImkZxRjaaa3OSwSyeMB48XAvlwMciOG+/B\n\t5N5/s219KZi6ToQu9JDC11D99V7KaLGvbF1XzaiZGSQqCxW5pk/zEuOOZlU8A6EhndKR+7rqu9q\n\t2FCiqpu2kvoRM5y0Tnm4a4lds2WbqhiaI4JqpHr/7iBl8tFklBsJc08ya2sbp2qLRnAdqiEUDPG\n\tQSb/5g1PcH687Rq1rMIVDP5zhwhnlgVQElM7VlrHI+RiBc7+AmCPY6H+Pb6mFtTKiBwv76Eqx8U\n\tcSL+vaJQGrZrPScrJo52bj5DpkuswHT7ttXXypf5fPt+d6VClcTWfD9WM",
        "X-Received": [
            "by 2002:a17:903:18a:b0:2b0:9c2b:641d with SMTP id\n d9443c01a7336-2b28164c170mr64609705ad.2.1775292794142;\n        Sat, 04 Apr 2026 01:53:14 -0700 (PDT)",
            "by 2002:a17:903:18a:b0:2b0:9c2b:641d with SMTP id\n d9443c01a7336-2b28164c170mr64609525ad.2.1775292793610;\n        Sat, 04 Apr 2026 01:53:13 -0700 (PDT)"
        ],
        "From": "Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>",
        "Date": "Sat, 04 Apr 2026 14:23:00 +0530",
        "Subject": "[PATCH 2/2] PCI: Fix NULL pointer access in\n pci_store_saved_state()",
        "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": "7bit",
        "Message-Id": "<20260404-fix_pci_access-v1-2-416f32c6f7ec@oss.qualcomm.com>",
        "References": "<20260404-fix_pci_access-v1-0-416f32c6f7ec@oss.qualcomm.com>",
        "In-Reply-To": "<20260404-fix_pci_access-v1-0-416f32c6f7ec@oss.qualcomm.com>",
        "To": "Bjorn Helgaas <bhelgaas@google.com>,\n        manivannan.sadhasivam@oss.qualcomm.com",
        "Cc": "linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,\n        Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>",
        "X-Mailer": "b4 0.14.2",
        "X-Developer-Signature": "v=1; a=ed25519-sha256; t=1775292785; l=2834;\n i=krishna.chundru@oss.qualcomm.com; s=20230907; h=from:subject:message-id;\n bh=9OJ4UNKQcRb8Ws8QLo61/dvK/QzgaBZThrXn5UYtEf8=;\n b=YtTtpgacAWIa6+gDdtLCAfY+uvhDy3uUYQ8KKTtVJGF3HsC2IxyafsNdiEwAqgCcH7zPAiSfy\n YWoi4GOcxT2C8FXP8HmGN2DjGb8ZVujMMY3bMfMJJ1gASRpVQR/yfdW",
        "X-Developer-Key": "i=krishna.chundru@oss.qualcomm.com; a=ed25519;\n pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg=",
        "X-Proofpoint-ORIG-GUID": "V7BrWV825S4sGiaRPVfkQmBm19ZAFEty",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDA0MDA3OCBTYWx0ZWRfX+r58W11jnVre\n FfOYdISkj0HXtBIgefGsQqpatpIMM+NjNI3XwDYpcTMSy2iuuYLFcPJ6di5/3o/j/WcNmTI+HQQ\n AyMLdUSzJJhRGjazfP4UzqZ7XJVNp7QTxae2W/64bFKYzYG110YITesm2xevu6eKgnFa1VMHTbg\n N4pKgdegfOQaSZfk17BR7AaPISIYom96Njj+wX6OFeVWkewkGrqO0WNpJX7KA6sX7pUqeXvb9yp\n KU23W9uaXwr5GKHS6scKNnu3a4IEnDq5aSg9PJJ32ChNhv/lH4g1lnefVTq5IveabUBabO7GZW9\n TOPo6ZHoQsrceP+vB0AYMhzzSilk+KISjstSyanYyZq9POLevfTo6dEFg4CHs6uvNzzfouYJoHq\n q5z3SyieOwjbRyCvWPbPGV+gbV2TkkPCDZOalGFKJdM0Ka0dNLgoUEjcOz1fDf/m7MymPMViQHA\n 8pesJi3Od0ImVsrvnjw==",
        "X-Authority-Analysis": "v=2.4 cv=PpaergM3 c=1 sm=1 tr=0 ts=69d0d17b cx=c_pps\n a=IZJwPbhc+fLeJZngyXXI0A==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17\n a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10\n a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22\n a=EUspDBNiAAAA:8 a=SbfQo5s_ALff5BtGSsgA:9 a=QEXdDO2ut3YA:10\n a=uG9DUKGECoFWVXl0Dc02:22",
        "X-Proofpoint-GUID": "V7BrWV825S4sGiaRPVfkQmBm19ZAFEty",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-03_07,2026-04-03_01,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n clxscore=1015 spamscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0\n suspectscore=0 priorityscore=1501 malwarescore=0 impostorscore=0 adultscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2604040078"
    },
    "content": "If the PCIe link goes down while pci_save_state() is in progress, reads\nfrom the device configuration space may return invalid values(all 0xF's).\n\nThis can lead to saving corrupted or inconsistent capability state and\nsubsequent memory corruption. The issue is not limited to a specific\ncapability type and may occur at any point during the save process.\n\nOne example is, while saving VC extended capability save path\n(pci_save_vc_state() / pci_vc_do_save_buffer()) then interprets all-1s\ncapability fields as valid and ends up writing far beyond the allocated\npci_cap_saved_state buffer, corrupting the pci_dev->saved_cap_space list.\n\nThe call stack of the issue as follows.\n\n[ T1634] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000013\n[ T1634] Mem abort info:\n[ T1634]   ESR = 0x96000005\n[ T1634]   EC = 0x25: DABT (current EL), IL = 32 bits\n[ T1634]   SET = 0, FnV = 0\n[ T1634]   EA = 0, S1PTW = 0\n[ T1634]   FSC = 0x05: level 1 translation fault\n[ T1634] Data abort info:\n[ T1634]   ISV = 0, ISS = 0x00000005\n[ T1634]   CM = 0, WnR = 0\n[ T1634] user pgtable: 4k pages, 39-bit VAs, pgdp=00000000ac2ed000\n[ T1634] [0000000000000013] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000\n[ T1634] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP\n[ T1634] Dumping ftrace buffer:\n[ T1634]    (ftrace buffer empty)\n[ T1634] pc : pci_store_saved_state+0x40/0xd8\n[ T1634] lr : cnss_set_pci_config_space+0x54/0x100 [cnss2]\n[ T1634] Call trace:\n[ T1634]  pci_store_saved_state+0x40/0xd8\n[ T1634]  cnss_set_pci_config_space+0x54/0x100 [cnss2]\n\nFix this issue by bailing out early from pci_store_saved_state() if link\nis not active and also make saved_state = false.\n\nThe link state check here is racy since the link may transition at any\ntime. This is a best-effort attempt to avoid saving PCI state when the\nlink is already down.\n\nSigned-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>\n---\n drivers/pci/pci.c | 10 ++++++++++\n 1 file changed, 10 insertions(+)",
    "diff": "diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c\nindex 1488c93d4e22371480165cb55afc7a0c3cae238e..06bd6b7d62ec1a41bd12af2ab47ecd2b77665c7e 100644\n--- a/drivers/pci/pci.c\n+++ b/drivers/pci/pci.c\n@@ -1875,6 +1875,16 @@ struct pci_saved_state *pci_store_saved_state(struct pci_dev *dev)\n \tif (!dev->state_saved)\n \t\treturn NULL;\n \n+\t/*\n+\t * The link state check here is racy since the link may transition at\n+\t * any time. This is a best-effort attempt to avoid saving PCI state\n+\t * when the link is already down.\n+\t */\n+\tif (!pcie_link_is_active(dev)) {\n+\t\tdev->state_saved = false;\n+\t\treturn NULL;\n+\t}\n+\n \tsize = sizeof(*state) + sizeof(struct pci_cap_saved_data);\n \n \thlist_for_each_entry(tmp, &dev->saved_cap_space, next)\n",
    "prefixes": [
        "2/2"
    ]
}