get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2226056,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2226056/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/2ff52853da5f36c2d695d090c839bac87a35edcb.1776839248.git.ionut.nechita@windriver.com/",
    "project": {
        "id": 28,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "<2ff52853da5f36c2d695d090c839bac87a35edcb.1776839248.git.ionut.nechita@windriver.com>",
    "list_archive_url": null,
    "date": "2026-04-22T06:32:41",
    "name": "[v14,1/2] PCI/IOV: Make pci_lock_rescan_remove() reentrant and protect sriov_add_vfs/sriov_del_vfs",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "fa8b334b2c3e4684071c1354a120b13628125650",
    "submitter": {
        "id": 92607,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/92607/?format=api",
        "name": "Ionut Nechita (Wind River)",
        "email": "ionut.nechita@windriver.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/2ff52853da5f36c2d695d090c839bac87a35edcb.1776839248.git.ionut.nechita@windriver.com/mbox/",
    "series": [
        {
            "id": 500927,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/500927/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=500927",
            "date": "2026-04-22T06:32:40",
            "name": "PCI/IOV: Fix SR-IOV locking races and AB-BA deadlock",
            "version": 14,
            "mbox": "http://patchwork.ozlabs.org/series/500927/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2226056/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2226056/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-52922-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=windriver.com header.i=@windriver.com\n header.a=rsa-sha256 header.s=PPS06212021 header.b=Fajmsw2r;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-pci+bounces-52922-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=windriver.com header.i=@windriver.com\n header.b=\"Fajmsw2r\"",
            "smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=205.220.178.238",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=windriver.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=windriver.com"
        ],
        "Received": [
            "from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\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 4g0qFm3H25z1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 16:34:36 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id D41123037789\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 06:34:16 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 992F430F7F2;\n\tWed, 22 Apr 2026 06:34:16 +0000 (UTC)",
            "from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com\n [205.220.178.238])\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 3BF4A3246F0;\n\tWed, 22 Apr 2026 06:34:12 +0000 (UTC)",
            "from pps.filterd (m0250812.ppops.net [127.0.0.1])\n\tby mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63M5gD6p943792;\n\tWed, 22 Apr 2026 06:33:45 GMT",
            "from cy3pr05cu001.outbound.protection.outlook.com\n (mail-westcentralusazon11013028.outbound.protection.outlook.com\n [40.93.201.28])\n\tby mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4dpenv8heg-1\n\t(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n\tWed, 22 Apr 2026 06:33:43 +0000 (GMT)",
            "from SN7PR11MB7540.namprd11.prod.outlook.com (2603:10b6:806:340::7)\n by SA2PR11MB5116.namprd11.prod.outlook.com (2603:10b6:806:fa::9) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9846.20; Wed, 22 Apr\n 2026 06:33:41 +0000",
            "from SN7PR11MB7540.namprd11.prod.outlook.com\n ([fe80::2edd:5c6d:169c:389b]) by SN7PR11MB7540.namprd11.prod.outlook.com\n ([fe80::2edd:5c6d:169c:389b%6]) with mapi id 15.20.9846.016; Wed, 22 Apr 2026\n 06:33:41 +0000"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776839656; cv=fail;\n b=HrukbtISOGceg7iaOBbe2l3wbozkm9JpMKKcdlHTE40d7cDam00IaXcfgt8v6WhtLvp4RH8VlvMQqrKjxfwaRjqdL5krJHz3hgSOxcF/MrOCSMzQiAk+JYbjnSvnHzE3LBaaRDaV9D1x3yb3BHZcXTgRT9I9qVvW+uUAfq3kCuw=",
            "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=Ia8rkYlLGlfuuxGXmInYpdLwud7wQUkwMtKs/2JmOqdf7dRCs+6xGGUoVVsRgBONh718AZwsvoZPPNyl5+2WvOSK2bGQrWN9ONOGOVyS4l70i+wOuMxhyiYxaxSuTsEyLZNoXrHahu0Ed6KUfq3SeOXkyU3cZ6CV8CWHMtF00Tbjl3s9166XISEbG0SF8Ih0/FylDzwNbRjkrGbdoJpX3bqSu1YkHQ0J1ZbdiaL8JLfCwT0xg52Jqb8ihxVqbcUOQCok0p4MALyVI6SbH0MQa3+K9gahNKFw14wv7Rw//uBKmYFBR5fkgeXA2Z+U7vhQEdlXCx5aONqGHUcG4yo9+w=="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776839656; c=relaxed/simple;\n\tbh=Oj9aUMqqclCYjPLPIDz+E2EVJDxwobLb+GErdT26r7I=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t Content-Type:MIME-Version;\n b=CZHGxoIcgjkOm03VlyV+086Cj23dbadHAyCM7E7nJJFlhlTGkMuAwYX3pqo/iIgRrndMvALF1aZLhmdYP3mNVs2P7vrBRvL/blDjFGE3ecxLIjWIah9p3aq/j9nKxv+B3tL4t0moAr8JHEGxEaUj/waHmo5jTsgLE3YllbDNj2A=",
            "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=wjPon4yJp0Gp49rOEHpr5bIo4Hxao5DJ37lNHhuRtks=;\n b=YuZiiSlip57Wxg7aQbxsY3KPG3pAgjyNHZSDQevD0vh3wy5eV2lNUxoCZ6M4Wy6PKEBUGlzTgzdnUKgeGXkGHis8LzmUv0W6AeelzHOghyL68ESTfx0Ja8lqV9hjvOIg9geVwuicZTMQzYLyDbal97EG7tSbVk7YTHfRRAUyE6KN/4OjoiZ9fY5Qwma1st4wSwnnSZJXt4vNt8RM9GaJSebbGzIaDlGuxPzxxSVoqCAt6JQGGnQaMDLCsOUrnB0rOnmbF2OTyBmciXlZFpjn9vpLmqc+gdOHfHZEdrcdUIvb8T3Ca2cS+LguUFsy730ESKykG52F67XCjoBds4s9LQ=="
        ],
        "ARC-Authentication-Results": [
            "i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=windriver.com;\n spf=pass smtp.mailfrom=windriver.com;\n dkim=pass (2048-bit key) header.d=windriver.com header.i=@windriver.com\n header.b=Fajmsw2r; arc=fail smtp.client-ip=205.220.178.238",
            "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=windriver.com; dmarc=pass action=none\n header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com;\n\t h=cc:content-transfer-encoding:content-type:date:from\n\t:in-reply-to:message-id:mime-version:references:subject:to; s=\n\tPPS06212021; bh=wjPon4yJp0Gp49rOEHpr5bIo4Hxao5DJ37lNHhuRtks=; b=\n\tFajmsw2rsGc0nnnq5IOcK/NxY74ZejKFSADYGNlMDX7rIX8SOBMP2XLdI26YOlHe\n\ttY/8SqMee9MN0dTJcR5qwXWySOUa9740NIvUcpdwwsCx9b20x75CSxSeK2z8bFGU\n\tJWgeAwna6/dAXgRkXE50R5/poiUKBWYjS2l50jvqlDKsmO8lSEJQMcXQD5tg01/H\n\t+J1MBkQVWDSx9dEgTegaRFFYFRW3+XhQhg6LN7m3JhNG5L1QhKp1qhwh2d1PgB1E\n\t2aN8w+OyHTcD270e2clvIdNEwLcEOMejF62O3fLMLfcDYAitFQUPf+PRRDoCfTTd\n\tbABnjb4O2DK4h0E8RHE9Aw==",
        "From": "\"Ionut Nechita (Wind River)\" <ionut.nechita@windriver.com>",
        "To": "linux-pci@vger.kernel.org, bhelgaas@google.com",
        "Cc": "helgaas@kernel.org, sebott@linux.ibm.com, schnelle@linux.ibm.com,\n        bblock@linux.ibm.com, linux@roeck-us.net, lukas@wunner.de,\n        stable@vger.kernel.org, linux-kernel@vger.kernel.org,\n        intel-xe@lists.freedesktop.org, matthew.brost@intel.com,\n        michal.wajdeczko@intel.com, piotr.piorkowski@intel.com,\n        dtatulea@nvidia.com, mani@kernel.org, kbusch@kernel.org,\n        lkml@mageta.org, alifm@linux.ibm.com, julianr@linux.ibm.com,\n        ionut_n2001@yahoo.com, sunlightlinux@gmail.com",
        "Subject": "[PATCH v14 1/2] PCI/IOV: Make pci_lock_rescan_remove() reentrant and\n protect sriov_add_vfs/sriov_del_vfs",
        "Date": "Wed, 22 Apr 2026 09:32:41 +0300",
        "Message-ID": "\n <2ff52853da5f36c2d695d090c839bac87a35edcb.1776839248.git.ionut.nechita@windriver.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<cover.1776839248.git.ionut.nechita@windriver.com>",
        "References": "<cover.1776839248.git.ionut.nechita@windriver.com>",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "VIYP296CA0004.AUTP296.PROD.OUTLOOK.COM\n (2603:10a6:800:29d::15) To PH0PR11MB7541.namprd11.prod.outlook.com\n (2603:10b6:510:26d::16)",
        "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",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "SN7PR11MB7540:EE_|SA2PR11MB5116:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "b26e39f9-ddec-4ee6-a50b-08dea03917fc",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "\n\tBCL:0;ARA:13230040|10070799003|1800799024|366016|376014|7416014|52116014|22082099003|18002099003|56012099003;",
        "X-Microsoft-Antispam-Message-Info": "\n\t/vBzrWuOSIhvcjvTGDr7DjR03vd/VkZOZlkad/srDCAJCEkOjQkqj9im9FGBX+PyObqnzVWa7rZN0blNfIbQ0wnceZt3HZ8SIubfDtBFHO05RpJJAB8cbsfz3leFcEiPpjStSZa6ERiKMfLDXquocsBdEv4JxEm/QWAtghLvdqhe5Kb7Xp7uaL/PbzngxAv8SRj+mF17N6ZpyUW+MMv/ruxvOhwhkACpB4n+hbgzfsIqEL1k7Atqv7d3SAczEzgM1rz/afAaL5BUK7CRS1D6sQm6vYGnKd6ultxebMtI3SlEJ3k53SWIPsraJ5EE57N6x0znjeQYRXPUHrkUs0PdvaLdIzBaBNhmMYyF97/8V+Rx1I2a5EwtoBRlrSUGOZdfGSlGOVJUWkJMmswdjawNP8rMKbZX4LH2W8B2qCTk3WaHUAv0gK5WsPbR6X9P2e3nJaWa9hfXopZbc4Jd4w/us+ZScqV9Yf6FBn8fPgvrenOZmt6R6QmQCgm4rL/YukR2ogI+zNyTIx0ynLOEDiKeYKkpUROzlGigEuDApb0t5GKqC44dcbORnG1Z6aV511A/c1pdBTp5yo7seP8XXfTJW4CjxmTUNRJw1Jm0+gIrmBVMCokSjFKsGTRtUzYctTRsK4TybAl7qhDBPQnnLSrAs6p3JJMq9RuMGsM3XcwnSIWvwxqTDJLbzOEZ5u1QDRVd+Pbf6/Q6dh6cF4tGVt7f8Dhoxw1XRN2o9mnBbFrk0+A=",
        "X-Forefront-Antispam-Report": "\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR11MB7540.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(10070799003)(1800799024)(366016)(376014)(7416014)(52116014)(22082099003)(18002099003)(56012099003);DIR:OUT;SFP:1101;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "2",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n yjD+N7g5G5kB6GIK85LwG3eA7I0a5bprNIKlimne5zaJbTEXbnpjiZVnD+t0VvTKuEyN49+sS83sO6sUDeNwWPMBC69LrxIwCxZGNU6fF+jRqHGoNk8tOrxXsQayF3K+OZwdQgidmKTSaGImUvGt/R4JmQ4gctvzAY8See5YalpcUPdv265uhCPFQV5cZINFgbVfYcVIn5AUX3HiiELjhtoCiwt+TmlMewnTjWS+iOf+IiDVezSYvSd5ESXqsiFoP8s+CXRTvwBdygJDdzoHes4nFeIhf9A0JDzRQ5FNk896Rt7GgYqs0BGjTjT9hPoTQ8GKjvhJT1H/SwI6pqC2PbaZRlexzn6os+F4RBTU2nRrBwaI41qY3HyLAfQ+akQpLvlxSaSjBqkl722ng3uzoICDK2gsnvEB7Mhl9SpNOvY6f9SmcgA3jB+6PW4SBTWHeNZjXN1eXPvvZVLJY/fZMhXdFsPEeSF+2JYd0lGoSrRgmCVPQzOYYRiihzn5ytmWuC1IBUOmPnkILOQl3Y64PbNFOHFnf1lGs+TdVz/k00arTH0IwVw818CurGfQD7bEVG9g8VbuuFMc7E5SVia2hnDUTZp5TTzEPOpR6o6yax1yj+aTEQ5NrFgYxGrfKzktguTZSH0AmXrcifgsoXyrFRO5x/4fN7WfiNTdltEgOB84LOhK+xN/fP40y8P6/ITP5uDahAAxPat85P5N3Ue124pCiRkLHv+VubuDghsouOz19M9tZOosxrm1481/IUgRqHHo+rGDRBu2AVow6H5rJobpXFZl2m778dtX9pD54bSErO7V1wIqDjJjLO3bK/MZsEyUUKjV0uFPMKeorwHoKQSkP9TEWGgWlqg7KvioIQhj0oeu6AcoCw4rc/H4lohPF77C7lFr7LMgcsV6RIdybTnU4e77ZR+2wkgGUqQifdg1Q/BAVnwBcohFf0shoISZW6TKgx5GqWeAaew9igng7MXEq10oA55TGhekXEnAO+feSn/IkKlm+tFWUJnLGElNuqeCP2Cl+oiVGZVsNIRyILvFiBKsO22vqm8SU/V0FhnGEattqdzxWFcvWmggZmzeTC3ay9m1VNeLnk7QLimmO5jBrO0M16Z2ENJo7U06iZHDKXUDUMTbdlagBEHtvj2e47JoeE1drSTxP/b7u6us1nGW1/wt/APufaQphEZmUbSOYw93B8ldUNx1dHXDFqbxkxWR/cc6K14Mb+sgXxb9g9vsraXqxaLH+Cl7HuJMr/NCVRs5H2nh723nZIzDQhG2HINeG5uDgEaLFhgkVPTc2I2macCSWadkV1jMUCkwo6Syuk9WX5QxeVsakuiTGJxQBojs6cMtlW0iueyUkIR9Yjp5zA9vhce6v5Q/aI0lVWmJCWvTV5smElhQmvkQGigMJCbzu44Yxa9DsTEq4oFhi5tqsT8d5+mFn/EwGGDQcG6PjHzdDq6Muh+ro/easDiCNaBDvwwQzSl//qbtY2hQXOzEeLW03zgJtYtGm1bM0ZjmlWWmiWnG6K+tzMUW0VyoBHH+gHzmgRceMgsk5ov/DHDGPCQSgj79PnIupj1xZjNJm3zBtwuheTNe6tXUL+c5Zv6E4FflQXspN1BXn3WHD261UB1VR+0VKE32YAAlJoRs7ujT3qsZPDXfUWzOtlqzeRmeWi5uGbe40un1i4QSQHWKfEeVrAlALl6+RnQEwj67mN5pZGJ/kisabx1V8l1LNf5Lxi/StDDy2YNseudMlnKPYKRlQFn6AML8ctNPUK6kaaHCbMpSb7aFVNdrJfWwzea/Bped",
        "X-MS-Exchange-AntiSpam-MessageData-1": "w/tVjliMT46JGddry4z2r/0yuottBkLPw6s=",
        "X-Exchange-RoutingPolicyChecked": "\n\tC4etp8mUMAweH60/3atmM1R7QYOxhyRupbp9Fg3KHIUsKHNns9VjEpxlOC4a4aWsEfZvu/DCMFfIilWtw1kS9+ldjd53/yqPXg6BuVlTcUyNNtwe386OTNJNWA1X4H5htZ2po4U09a5w2hB72RKzImuPKeooY95Q/6PXIY2NnWvhNpRYS74U8aPiQOykWKxQtyvf1oGtWW6TAQec67wuymkMK3G+9OmJbhRI4hD/wNziCgZ5THY8avdpcpgg0kkU/hJHB/KP9C/Ke/Y0ZSM/L+zUfI1XV2MgPRULHapJ97jAQCOUtfCcYIh1hC42L6YJuyg/vWJ8M/vqrdpWPRD7iw==",
        "X-OriginatorOrg": "windriver.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n b26e39f9-ddec-4ee6-a50b-08dea03917fc",
        "X-MS-Exchange-CrossTenant-AuthSource": "PH0PR11MB7541.namprd11.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "22 Apr 2026 06:33:41.5729\n (UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "8ddb2873-a1ad-4a18-ae4e-4644631433be",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n nFEhsp8Ka6NYcHTCpET4gJkQdIouPvaToaiCXEvh/P5nTOLisSz2Axc+FwccO6e13/04ImaKuP8AffjCC6cp1ZXcmRaYkAw762bPCZPVA1c=",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SA2PR11MB5116",
        "X-Proofpoint-ORIG-GUID": "ZgAi5WJ7DrWwBkZxGrR2_ptg9CUTu_fJ",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDIyMDA1OSBTYWx0ZWRfX/4hPaENNKqOv\n iHiA/rhhj2Jlzk4r0vQpiLMA8tOZ/W9CwkgAirC0lXvCd4ijJRTtMblzJqwYjYhj8VgnwUB0TRU\n KD3o2QB1jV8C1BThRS8fSpA4X0pDV9lj91X3uJhoMGNbYu/rDO5OIQhZADsZvMKV7A+NLWOx7aQ\n WXNCYvXM2hi22MEfZkT/Ps0u4Zom3iJ66vDlME9nF7UdTBhE+vNwnQYLkMW+d9/uJbz/wyvs4zN\n +4eeH/ZGLSgDXB1G/qru/3KF2aulfW28SElMJQbD5lGLBQ5FQIFmB6kGxpDfvIUcuxrOXujMl4+\n 5wGPOI4nFVDdaCTHS2QYwEJI/bTWF/doI5+s0nUNl/63nJoQaIWcXBmPiGdmyRbXmaq87L5HyYw\n x6yFoL4cVbucyWwvkZErdCWSGDEZN0IyY2Y7jOjEoAh7Q7Tn8g1jfhVWhwFZK/unoJ39MQQDIgN\n MZBdxNUXagb59uPXvCg==",
        "X-Authority-Analysis": "v=2.4 cv=B9yJFutM c=1 sm=1 tr=0 ts=69e86bc7 cx=c_pps\n a=6NHOJSrb2DrgGhcKreW8mw==:117 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19\n a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19\n a=xqWC_Br6kY4A:10 a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=bi6dqmuHe4P4UrxVR6um:22 a=fTW__CHxibyLmBMfj2wP:22 a=t7CeM3EgAAAA:8\n a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=hh5_vNSPTWDFZ6TSUYYA:9\n a=FdTzh2GWekK77mhwV6Dw:22",
        "X-Proofpoint-GUID": "ZgAi5WJ7DrWwBkZxGrR2_ptg9CUTu_fJ",
        "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-21_03,2026-04-21_02,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n clxscore=1015 malwarescore=0 lowpriorityscore=0 impostorscore=0\n suspectscore=0 phishscore=0 bulkscore=0 priorityscore=1501 adultscore=0\n spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound\n adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000\n definitions=main-2604220059"
    },
    "content": "From: Ionut Nechita <ionut.nechita@windriver.com>\n\nAfter reverting commit 05703271c3cd (\"PCI/IOV: Add PCI rescan-remove\nlocking when enabling/disabling SR-IOV\") and moving the lock to\nsriov_numvfs_store(), the path through driver .remove() (e.g. rmmod,\nor manual unbind) that calls pci_disable_sriov() directly remains\nunprotected against concurrent hotplug events. This affects any SR-IOV\ncapable driver that calls pci_disable_sriov() from its .remove()\ncallback (i40e, ice, mlx5, bnxt, etc.).\n\nOn s390, platform-generated hot-unplug events for VFs can race with\nsriov_del_vfs() when a PF driver is being unloaded. The platform event\nhandler takes pci_rescan_remove_lock, but sriov_del_vfs() does not,\nleading to double removal and list corruption.\n\nWe cannot use a plain mutex_lock() here because sriov_del_vfs() may also\nbe called from paths that already hold pci_rescan_remove_lock (e.g.\nremove_store -> pci_stop_and_remove_bus_device_locked, or\nsriov_numvfs_store with the lock taken by the previous patch). Using\nmutex_lock() in those cases would deadlock.\n\nMake pci_lock_rescan_remove() itself reentrant by tracking the current\nowner task and a recursion depth counter, as suggested by Lukas Wunner\nand Benjamin Block, since these recursive locking scenarios exist\nelsewhere in the PCI subsystem:\n - If the lock is already held by the current task (owner == current):\n   increments the depth counter and returns without re-acquiring,\n   avoiding deadlock.\n - If the lock is held by another task: blocks until the lock is\n   released, then records the owner and sets depth to 1.\n - If the lock is not held: acquires the mutex normally.\n\npci_unlock_rescan_remove() decrements the depth counter and releases\nthe mutex (clearing the owner) only when the depth reaches zero.\nA WARN_ON catches mismatched unlock calls from tasks that do not own\nthe lock.\n\nThis avoids relying on mutex_get_owner(), which is not exported to\nmodules and caused link failures for builds that inline this code\noutside of the core kernel image.\n\nThis approach keeps the API unchanged: callers simply pair lock/unlock\ncalls without needing to track any return value or use separate\nreentrant variants.\n\nAdd pci_lock_rescan_remove()/pci_unlock_rescan_remove() calls to\nsriov_add_vfs() and sriov_del_vfs() to protect VF addition and\nremoval against concurrent hotplug events.\n\nRemove the rescan/remove locking from sriov_numvfs_store() that was\nintroduced by commit a5338e365c45 (\"PCI/IOV: Fix race between SR-IOV\nenable/disable and hotplug\"), since the locking is now handled directly\nin sriov_add_vfs() and sriov_del_vfs() where it is actually needed,\nreducing the lock scope.\n\nFixes: 18f9e9d150fc (\"PCI/IOV: Factor out sriov_add_vfs()\")\nFixes: 05703271c3cd (\"PCI/IOV: Add PCI rescan-remove locking when enabling/disabling SR-IOV\")\nFixes: a5338e365c45 (\"PCI/IOV: Fix race between SR-IOV enable/disable and hotplug\")\nCc: stable@vger.kernel.org\nSuggested-by: Lukas Wunner <lukas@wunner.de>\nSuggested-by: Benjamin Block <bblock@linux.ibm.com>\nReviewed-by: Benjamin Block <bblock@linux.ibm.com>\nTested-by: Benjamin Block <bblock@linux.ibm.com>\nSigned-off-by: Ionut Nechita <ionut.nechita@windriver.com>\n---\n drivers/pci/iov.c   |  9 +++++----\n drivers/pci/probe.c | 18 ++++++++++++++++--\n 2 files changed, 21 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c\nindex 91ac4e37ecb9..7ed902539051 100644\n--- a/drivers/pci/iov.c\n+++ b/drivers/pci/iov.c\n@@ -495,9 +495,7 @@ static ssize_t sriov_numvfs_store(struct device *dev,\n \n \tif (num_vfs == 0) {\n \t\t/* disable VFs */\n-\t\tpci_lock_rescan_remove();\n \t\tret = pdev->driver->sriov_configure(pdev, 0);\n-\t\tpci_unlock_rescan_remove();\n \t\tgoto exit;\n \t}\n \n@@ -509,9 +507,7 @@ static ssize_t sriov_numvfs_store(struct device *dev,\n \t\tgoto exit;\n \t}\n \n-\tpci_lock_rescan_remove();\n \tret = pdev->driver->sriov_configure(pdev, num_vfs);\n-\tpci_unlock_rescan_remove();\n \tif (ret < 0)\n \t\tgoto exit;\n \n@@ -633,15 +629,18 @@ static int sriov_add_vfs(struct pci_dev *dev, u16 num_vfs)\n \tif (dev->no_vf_scan)\n \t\treturn 0;\n \n+\tpci_lock_rescan_remove();\n \tfor (i = 0; i < num_vfs; i++) {\n \t\trc = pci_iov_add_virtfn(dev, i);\n \t\tif (rc)\n \t\t\tgoto failed;\n \t}\n+\tpci_unlock_rescan_remove();\n \treturn 0;\n failed:\n \twhile (i--)\n \t\tpci_iov_remove_virtfn(dev, i);\n+\tpci_unlock_rescan_remove();\n \n \treturn rc;\n }\n@@ -766,8 +765,10 @@ static void sriov_del_vfs(struct pci_dev *dev)\n \tstruct pci_sriov *iov = dev->sriov;\n \tint i;\n \n+\tpci_lock_rescan_remove();\n \tfor (i = 0; i < iov->num_VFs; i++)\n \t\tpci_iov_remove_virtfn(dev, i);\n+\tpci_unlock_rescan_remove();\n }\n \n static void sriov_disable(struct pci_dev *dev)\ndiff --git a/drivers/pci/probe.c b/drivers/pci/probe.c\nindex b63cd0c310bc..91f1dae6943b 100644\n--- a/drivers/pci/probe.c\n+++ b/drivers/pci/probe.c\n@@ -3513,16 +3513,30 @@ EXPORT_SYMBOL_GPL(pci_rescan_bus);\n  * routines should always be executed under this mutex.\n  */\n DEFINE_MUTEX(pci_rescan_remove_lock);\n+static const struct task_struct *pci_rescan_remove_owner;\n+static unsigned int pci_rescan_remove_depth;\n \n void pci_lock_rescan_remove(void)\n {\n-\tmutex_lock(&pci_rescan_remove_lock);\n+\tif (pci_rescan_remove_owner == current) {\n+\t\tpci_rescan_remove_depth++;\n+\t} else {\n+\t\tmutex_lock(&pci_rescan_remove_lock);\n+\t\tpci_rescan_remove_owner = current;\n+\t\tpci_rescan_remove_depth = 1;\n+\t}\n }\n EXPORT_SYMBOL_GPL(pci_lock_rescan_remove);\n \n void pci_unlock_rescan_remove(void)\n {\n-\tmutex_unlock(&pci_rescan_remove_lock);\n+\tif (WARN_ON(pci_rescan_remove_owner != current))\n+\t\treturn;\n+\n+\tif (--pci_rescan_remove_depth == 0) {\n+\t\tpci_rescan_remove_owner = NULL;\n+\t\tmutex_unlock(&pci_rescan_remove_lock);\n+\t}\n }\n EXPORT_SYMBOL_GPL(pci_unlock_rescan_remove);\n \n",
    "prefixes": [
        "v14",
        "1/2"
    ]
}