get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 82324,
    "url": "http://patches.dpdk.org/api/patches/82324/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/166b4a84232777b5ff3dd5d659140dab104e3f77.1603782481.git.wangyunjian@huawei.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": "<166b4a84232777b5ff3dd5d659140dab104e3f77.1603782481.git.wangyunjian@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/166b4a84232777b5ff3dd5d659140dab104e3f77.1603782481.git.wangyunjian@huawei.com",
    "date": "2020-10-27T12:51:25",
    "name": "hash: fix dereference before null check",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "2be4a738a379194e45000dfa4847d4d94dfaa5ee",
    "submitter": {
        "id": 551,
        "url": "http://patches.dpdk.org/api/people/551/?format=api",
        "name": "Yunjian Wang",
        "email": "wangyunjian@huawei.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/166b4a84232777b5ff3dd5d659140dab104e3f77.1603782481.git.wangyunjian@huawei.com/mbox/",
    "series": [
        {
            "id": 13375,
            "url": "http://patches.dpdk.org/api/series/13375/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13375",
            "date": "2020-10-27T12:51:25",
            "name": "hash: fix dereference before null check",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/13375/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/82324/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/82324/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B20AEA04B5;\n\tTue, 27 Oct 2020 13:51:41 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 873504C8B;\n\tTue, 27 Oct 2020 13:51:40 +0100 (CET)",
            "from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191])\n by dpdk.org (Postfix) with ESMTP id 346144C89;\n Tue, 27 Oct 2020 13:51:38 +0100 (CET)",
            "from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60])\n by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CLBRG3JjbzLn9y;\n Tue, 27 Oct 2020 20:51:38 +0800 (CST)",
            "from localhost (10.174.187.156) by DGGEMS410-HUB.china.huawei.com\n (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Tue, 27 Oct 2020\n 20:51:26 +0800"
        ],
        "From": "wangyunjian <wangyunjian@huawei.com>",
        "To": "<dev@dpdk.org>, <yipeng1.wang@intel.com>, <sameh.gobriel@intel.com>",
        "CC": "<bruce.richardson@intel.com>, <dharmik.thakkar@arm.com>,\n <jerry.lilijun@huawei.com>, <xudingke@huawei.com>, Yunjian Wang\n <wangyunjian@huawei.com>, <stable@dpdk.org>",
        "Date": "Tue, 27 Oct 2020 20:51:25 +0800",
        "Message-ID": "\n <166b4a84232777b5ff3dd5d659140dab104e3f77.1603782481.git.wangyunjian@huawei.com>",
        "X-Mailer": "git-send-email 1.9.5.msysgit.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.174.187.156]",
        "X-CFilter-Loop": "Reflected",
        "Subject": "[dpdk-dev]  [PATCH] hash: fix dereference before null check",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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": "From: Yunjian Wang <wangyunjian@huawei.com>\n\nCoverity flags that 'h' variable is used before\nit's checked for NULL. This patch fixes this issue.\n\nCoverity issue: 363625\nFixes: 769b2de7fb52 (\"hash: implement RCU resources reclamation\")\nCc: stable@dpdk.org\n\nSigned-off-by: Yunjian Wang <wangyunjian@huawei.com>\n---\n lib/librte_hash/rte_cuckoo_hash.c | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c\nindex 7514e33aa9..1191dfd81a 100644\n--- a/lib/librte_hash/rte_cuckoo_hash.c\n+++ b/lib/librte_hash/rte_cuckoo_hash.c\n@@ -1515,15 +1515,16 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)\n \tstruct rte_rcu_qsbr_dq_parameters params = {0};\n \tchar rcu_dq_name[RTE_RCU_QSBR_DQ_NAMESIZE];\n \tstruct rte_hash_rcu_config *hash_rcu_cfg = NULL;\n-\tconst uint32_t total_entries = h->use_local_cache ?\n-\t\th->entries + (RTE_MAX_LCORE - 1) * (LCORE_CACHE_SIZE - 1) + 1\n-\t\t\t\t\t\t\t: h->entries + 1;\n \n \tif (h == NULL || cfg == NULL || cfg->v == NULL) {\n \t\trte_errno = EINVAL;\n \t\treturn 1;\n \t}\n \n+\tconst uint32_t total_entries = h->use_local_cache ?\n+\t\th->entries + (RTE_MAX_LCORE - 1) * (LCORE_CACHE_SIZE - 1) + 1\n+\t\t\t\t\t\t\t: h->entries + 1;\n+\n \tif (h->hash_rcu_cfg) {\n \t\trte_errno = EEXIST;\n \t\treturn 1;\n",
    "prefixes": []
}