get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 11627,
    "url": "https://patches.dpdk.org/api/patches/11627/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1458569175-8742-5-git-send-email-christian.ehrhardt@canonical.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1458569175-8742-5-git-send-email-christian.ehrhardt@canonical.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1458569175-8742-5-git-send-email-christian.ehrhardt@canonical.com",
    "date": "2016-03-21T14:06:14",
    "name": "[dpdk-dev,v4,4/5] lpm: fix use after free of lpm in rte_lpm_create*",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a8fee994abdfad08b0e17b7c1a965a327c4e8080",
    "submitter": {
        "id": 382,
        "url": "https://patches.dpdk.org/api/people/382/?format=api",
        "name": "Christian Ehrhardt",
        "email": "christian.ehrhardt@canonical.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1458569175-8742-5-git-send-email-christian.ehrhardt@canonical.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/11627/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/11627/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 9ED6C3772;\n\tMon, 21 Mar 2016 15:06:32 +0100 (CET)",
            "from youngberry.canonical.com (youngberry.canonical.com\n\t[91.189.89.112]) by dpdk.org (Postfix) with ESMTP id EA59D2C47\n\tfor <dev@dpdk.org>; Mon, 21 Mar 2016 15:06:27 +0100 (CET)",
            "from 1.general.mandel.uk.vpn ([10.172.196.172]\n\thelo=localhost.localdomain)\n\tby youngberry.canonical.com with esmtpsa\n\t(TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.76) (envelope-from <christian.ehrhardt@canonical.com>)\n\tid 1ai0TT-0002zo-I4; Mon, 21 Mar 2016 14:06:27 +0000"
        ],
        "From": "Christian Ehrhardt <christian.ehrhardt@canonical.com>",
        "To": "christian.ehrhardt@canonical.com, bruce.richardson@intel.com,\n\tdev@dpdk.org, olivier.matz@6wind.com",
        "Date": "Mon, 21 Mar 2016 15:06:14 +0100",
        "Message-Id": "<1458569175-8742-5-git-send-email-christian.ehrhardt@canonical.com>",
        "X-Mailer": "git-send-email 2.7.3",
        "In-Reply-To": "<1458569175-8742-1-git-send-email-christian.ehrhardt@canonical.com>",
        "References": "<1458131629-21925-1-git-send-email-christian.ehrhardt@canonical.com>\n\t<1458569175-8742-1-git-send-email-christian.ehrhardt@canonical.com>",
        "Subject": "[dpdk-dev] [PATCH v4 4/5] lpm: fix use after free of lpm in\n\trte_lpm_create*",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "There were further chances for a use after free by returning an already freed\npointer in rte_lpm_create for v20 and v1604.\nAlong that is also makes the RTE_LOG messages of the failed allocations unique.\n\nAcked-by: Olivier Matz <olivier.matz@6wind.com>\nSigned-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>\n---\n lib/librte_lpm/rte_lpm.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c\nindex d5fa1f8..59ce5a7 100644\n--- a/lib/librte_lpm/rte_lpm.c\n+++ b/lib/librte_lpm/rte_lpm.c\n@@ -303,8 +303,9 @@ rte_lpm_create_v1604(const char *name, int socket_id,\n \t\t\t(size_t)rules_size, RTE_CACHE_LINE_SIZE, socket_id);\n \n \tif (lpm->rules_tbl == NULL) {\n-\t\tRTE_LOG(ERR, LPM, \"LPM memory allocation failed\\n\");\n+\t\tRTE_LOG(ERR, LPM, \"LPM rules_tbl memory allocation failed\\n\");\n \t\trte_free(lpm);\n+\t\tlpm = NULL;\n \t\trte_free(te);\n \t\tgoto exit;\n \t}\n@@ -313,8 +314,9 @@ rte_lpm_create_v1604(const char *name, int socket_id,\n \t\t\t(size_t)tbl8s_size, RTE_CACHE_LINE_SIZE, socket_id);\n \n \tif (lpm->tbl8 == NULL) {\n-\t\tRTE_LOG(ERR, LPM, \"LPM memory allocation failed\\n\");\n+\t\tRTE_LOG(ERR, LPM, \"LPM tbl8 memory allocation failed\\n\");\n \t\trte_free(lpm);\n+\t\tlpm = NULL;\n \t\trte_free(te);\n \t\tgoto exit;\n \t}\n",
    "prefixes": [
        "dpdk-dev",
        "v4",
        "4/5"
    ]
}