get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 103644,
    "url": "http://patches.dpdk.org/api/patches/103644/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211103111615.6271-1-david.marchand@redhat.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20211103111615.6271-1-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211103111615.6271-1-david.marchand@redhat.com",
    "date": "2021-11-03T11:16:15",
    "name": "bus/pci: fix use after free on unplug",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "560eb3ae1cd6e5d3fc5ea4bfaa97b9e42b19ed07",
    "submitter": {
        "id": 1173,
        "url": "http://patches.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211103111615.6271-1-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 20267,
            "url": "http://patches.dpdk.org/api/series/20267/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=20267",
            "date": "2021-11-03T11:16:15",
            "name": "bus/pci: fix use after free on unplug",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/20267/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/103644/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/103644/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 071C4A0C53;\n\tWed,  3 Nov 2021 12:17:05 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 984724115A;\n\tWed,  3 Nov 2021 12:17:04 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by mails.dpdk.org (Postfix) with ESMTP id DE47541134\n for <dev@dpdk.org>; Wed,  3 Nov 2021 12:17:02 +0100 (CET)",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-58-V84MhwP_NSigwSu9nRYtvA-1; Wed, 03 Nov 2021 07:16:59 -0400",
            "from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com\n [10.5.11.15])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E2F16800053;\n Wed,  3 Nov 2021 11:16:57 +0000 (UTC)",
            "from dmarchan.remote.csb (unknown [10.40.192.22])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 62A4A5D6B1;\n Wed,  3 Nov 2021 11:16:56 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1635938222;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=itVSmTe1fKXGNtAWGFKtNp3oWeIfm4GEOSKcKRBOs8w=;\n b=GHE2iDFypHwjkfomNc0MZ2EHc2RbjsnZ1OrYpH35Sko8Hvl3Ggo/kb4Ej1tDjJqtQdhioN\n qv8mFsdN05wleYVWRXkKNG3/V8LKWZmJ11fBpDGgM1Dc0K46zh8DJ+ZKB45NAdbFkkP/ij\n lplK6A7EhfaTXXJbN1fLE/gC4dWJSZQ=",
        "X-MC-Unique": "V84MhwP_NSigwSu9nRYtvA-1",
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "yanx.xia@intel.com, Hyong Youb Kim <hyonkim@cisco.com>,\n Harman Kalra <hkalra@marvell.com>",
        "Date": "Wed,  3 Nov 2021 12:16:15 +0100",
        "Message-Id": "<20211103111615.6271-1-david.marchand@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.15",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"",
        "Subject": "[dpdk-dev] [PATCH] bus/pci: fix use after free on unplug",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "rte_pci_unmap_device() needs intr_handle objects to unregister\ncallbacks.\n\nBugzilla ID: 845\nFixes: d61138d4f0e2 (\"drivers: remove direct access to interrupt handle\")\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n drivers/bus/pci/pci_common.c | 17 +++++++++--------\n 1 file changed, 9 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c\nindex f8fff2c98e..4a3a87f24f 100644\n--- a/drivers/bus/pci/pci_common.c\n+++ b/drivers/bus/pci/pci_common.c\n@@ -271,10 +271,6 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,\n \t\treturn ret; /* no rollback if already succeeded earlier */\n \tif (ret) {\n \t\tdev->driver = NULL;\n-\t\trte_intr_instance_free(dev->vfio_req_intr_handle);\n-\t\tdev->vfio_req_intr_handle = NULL;\n-\t\trte_intr_instance_free(dev->intr_handle);\n-\t\tdev->intr_handle = NULL;\n \t\tif ((dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING) &&\n \t\t\t/* Don't unmap if device is unsupported and\n \t\t\t * driver needs mapped resources.\n@@ -282,6 +278,10 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,\n \t\t\t!(ret > 0 &&\n \t\t\t\t(dr->drv_flags & RTE_PCI_DRV_KEEP_MAPPED_RES)))\n \t\t\trte_pci_unmap_device(dev);\n+\t\trte_intr_instance_free(dev->vfio_req_intr_handle);\n+\t\tdev->vfio_req_intr_handle = NULL;\n+\t\trte_intr_instance_free(dev->intr_handle);\n+\t\tdev->intr_handle = NULL;\n \t} else {\n \t\tdev->device.driver = &dr->driver;\n \t}\n@@ -322,15 +322,16 @@ rte_pci_detach_dev(struct rte_pci_device *dev)\n \t/* clear driver structure */\n \tdev->driver = NULL;\n \tdev->device.driver = NULL;\n-\trte_intr_instance_free(dev->intr_handle);\n-\tdev->intr_handle = NULL;\n-\trte_intr_instance_free(dev->vfio_req_intr_handle);\n-\tdev->vfio_req_intr_handle = NULL;\n \n \tif (dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING)\n \t\t/* unmap resources for devices that use igb_uio */\n \t\trte_pci_unmap_device(dev);\n \n+\trte_intr_instance_free(dev->intr_handle);\n+\tdev->intr_handle = NULL;\n+\trte_intr_instance_free(dev->vfio_req_intr_handle);\n+\tdev->vfio_req_intr_handle = NULL;\n+\n \treturn 0;\n }\n \n",
    "prefixes": []
}