get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 108898,
    "url": "http://patches.dpdk.org/api/patches/108898/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220328020754.1155063-1-jiayu.hu@intel.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": "<20220328020754.1155063-1-jiayu.hu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220328020754.1155063-1-jiayu.hu@intel.com",
    "date": "2022-03-28T02:07:54",
    "name": "vhost: fix null pointer dereference",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "45a6a6e60ae3212d91fc6c2520bd0ca7fbb5300c",
    "submitter": {
        "id": 539,
        "url": "http://patches.dpdk.org/api/people/539/?format=api",
        "name": "Hu, Jiayu",
        "email": "jiayu.hu@intel.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220328020754.1155063-1-jiayu.hu@intel.com/mbox/",
    "series": [
        {
            "id": 22257,
            "url": "http://patches.dpdk.org/api/series/22257/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=22257",
            "date": "2022-03-28T02:07:54",
            "name": "vhost: fix null pointer dereference",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/22257/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/108898/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/108898/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 79393A034C;\n\tMon, 28 Mar 2022 04:08:01 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 22EE94068B;\n\tMon, 28 Mar 2022 04:08:01 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by mails.dpdk.org (Postfix) with ESMTP id 80ABB40143;\n Mon, 28 Mar 2022 04:07:59 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Mar 2022 19:07:58 -0700",
            "from npgdpdkvirtiojiayuhu117.sh.intel.com ([10.67.119.202])\n by orsmga007.jf.intel.com with ESMTP; 27 Mar 2022 19:07:56 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1648433279; x=1679969279;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=bAql9v0PSIM+YsSjJPtv8dwG2P1603AUQ4EJvz48TyE=;\n b=J/MT1zy9qy2Xzh8hEp37M2GHz8bmFVAGCxvKQMGHwn2v4h7omBNzE/c5\n euJf9MNSbF9Rz367Ep+u0Vqmw+hUBwMp6G9VFOQzmV7++3c/eFc74V+UC\n iwLCxBVe5NA9hN/IU9cdn0yDmfCEIrZcCTHQ9ifXdX6QK/AWtDbaqMt4K\n ho2fRu23YpP/+svmD+PCedx37HwLpM1ft3DiSqZlPP1klBzrGjB5GXsjc\n 8vA37vbuE/dA5XdAMsUYRLwRKugUaVY6lYWQOZkD84tm29lkpOwi78H/t\n wlATEaBNp9NAZdW3CUU/lQn+CzXALrEHGOwyjjAd63mTQudLMZEvVXOR8 w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10299\"; a=\"345328815\"",
            "E=Sophos;i=\"5.90,216,1643702400\"; d=\"scan'208\";a=\"345328815\"",
            "E=Sophos;i=\"5.90,216,1643702400\"; d=\"scan'208\";a=\"545767528\""
        ],
        "X-ExtLoop1": "1",
        "From": "Jiayu Hu <jiayu.hu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "maxime.coquelin@redhat.com, Jiayu Hu <jiayu.hu@intel.com>, stable@dpdk.org",
        "Subject": "[PATCH] vhost: fix null pointer dereference",
        "Date": "Sun, 27 Mar 2022 22:07:54 -0400",
        "Message-Id": "<20220328020754.1155063-1-jiayu.hu@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "NULL check for vq->async must be protected by lock. Otherwise, it is\npossible that the data plane thread dereferences vq->async with NULL\nvalue, since the control plane thread is freeing vq->async.\n\nFixes: ee8024b3d4ad (vhost: move async data in dedicated structure)\nCc: stable@dpdk.org\n\nSigned-off-by: Jiayu Hu <jiayu.hu@intel.com>\n---\n lib/vhost/vhost.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c\nindex bc88148347..7f60c2824f 100644\n--- a/lib/vhost/vhost.c\n+++ b/lib/vhost/vhost.c\n@@ -1887,9 +1887,6 @@ rte_vhost_async_get_inflight(int vid, uint16_t queue_id)\n \tif (vq == NULL)\n \t\treturn ret;\n \n-\tif (!vq->async)\n-\t\treturn ret;\n-\n \tif (!rte_spinlock_trylock(&vq->access_lock)) {\n \t\tVHOST_LOG_CONFIG(DEBUG,\n \t\t\t\"(%s) failed to check in-flight packets. virtqueue busy.\\n\",\n@@ -1897,6 +1894,9 @@ rte_vhost_async_get_inflight(int vid, uint16_t queue_id)\n \t\treturn ret;\n \t}\n \n+\tif (!vq->async)\n+\t\treturn ret;\n+\n \tret = vq->async->pkts_inflight_n;\n \trte_spinlock_unlock(&vq->access_lock);\n \n",
    "prefixes": []
}