get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43195,
    "url": "http://patches.dpdk.org/api/patches/43195/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180718214434.608-1-stephen@networkplumber.org/",
    "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": "<20180718214434.608-1-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180718214434.608-1-stephen@networkplumber.org",
    "date": "2018-07-18T21:44:34",
    "name": "[RFC] mem: poison memory when freed",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b1bf67ada2f120ec7929357df964fa10aee9ae02",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180718214434.608-1-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 663,
            "url": "http://patches.dpdk.org/api/series/663/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=663",
            "date": "2018-07-18T21:44:34",
            "name": "[RFC] mem: poison memory when freed",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/663/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43195/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43195/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E7D2D1C01;\n\tWed, 18 Jul 2018 23:44:40 +0200 (CEST)",
            "from mail-pf0-f194.google.com (mail-pf0-f194.google.com\n\t[209.85.192.194]) by dpdk.org (Postfix) with ESMTP id 00E6310A3\n\tfor <dev@dpdk.org>; Wed, 18 Jul 2018 23:44:38 +0200 (CEST)",
            "by mail-pf0-f194.google.com with SMTP id c21-v6so2808564pfn.8\n\tfor <dev@dpdk.org>; Wed, 18 Jul 2018 14:44:38 -0700 (PDT)",
            "from xeon-e3.wavecable.com (204-195-22-127.wavecable.com.\n\t[204.195.22.127]) by smtp.gmail.com with ESMTPSA id\n\tu42-v6sm14864609pgn.1.2018.07.18.14.44.36\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 18 Jul 2018 14:44:36 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id;\n\tbh=8In44YRJb0JxnX4dKoCxmDEWRLs1g1WT+7kXsrEjsZw=;\n\tb=qEZpZvn2tLsbcdw8OyvdHNZy/xeZcp4cs8pdeJJZf/ISrD3E4SPOSr08UKnaDO2NIt\n\tLuLfrzD+vGV6pCGxGAV1NfNoYntTO3ttlMpjYJ/8T4fwTr/k5Xy2PuR0PtYq26AXLccx\n\txD4CMMxPFbnd46pf7+0o6PSbBtwRfMUdXDk6MWJyw3fEe+I2HRzeZe3HQxqeQ7KWZco2\n\twWV6Hk9LgReozD7ettciBBpo2S48KKnSuW0w2ebyIbV4uvO++Lx+qH6wisAMNvkysivm\n\tFx0kJqnGyV082JUHmYrgqIT0IC/erhFg28PRnk628VuiET4UxYNjy4VEzoYwZhKL5qL5\n\tC8Kg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=8In44YRJb0JxnX4dKoCxmDEWRLs1g1WT+7kXsrEjsZw=;\n\tb=tjSsY/bbZoKyNC6cLFflO5SrBrHEFLCfg1BykEtP1zIVwrHaOz+XIjmUaZqajvG/uY\n\t9884nTpNuFVZW36saOahOkf+7nPLe3Go2WodxBrQrxJuv1Gq9Jkx4lGlYZlK7Ok1ATsl\n\th0lqe9ylCNsG1eBPbZ8P5grqSJ1Z8QJwHWpnTqza0B5d6yEEBb6FGYryzw8Qk2dXCUE6\n\tSkkj6uFUKtF/gQbNDwCqdymM8gJsjM3EFxrOD8wtPuaDXwuR+stYqVVGmr5jjAvS+IP4\n\tBZqbSXmJuOKlSrOE4zuC2hd6KK19sE0OvpGYIM3mrSjw/KnSsBTiqZKxSh7XmGJMokvQ\n\t+KZA==",
        "X-Gm-Message-State": "AOUpUlEpCmmxv26fAyk2Q1ST7RIXxa4oRFivJUrJrZYihphSnvof2Zli\n\tulwGDfm9U+pPG/ERxmSVFadcxA==",
        "X-Google-Smtp-Source": "AAOMgpeM+Ykm0aTkwtf2igfQxXxK+dx5O7nc/jXLwkmDLUKkKVHEeP0mxLppDItV/XPEnqOJtHvCxg==",
        "X-Received": "by 2002:a63:8749:: with SMTP id\n\ti70-v6mr7458245pge.325.1531950277913; \n\tWed, 18 Jul 2018 14:44:37 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "sergio.gonzalez.monroy@intel.com",
        "Cc": "dev@dpdk.org,\n\tStephen Hemminger <stephen@networkplumber.org>",
        "Date": "Wed, 18 Jul 2018 14:44:34 -0700",
        "Message-Id": "<20180718214434.608-1-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.18.0",
        "Subject": "[dpdk-dev] [RFC] mem: poison memory when freed",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "DPDK malloc library allows broken programs to work because\nthe semantics of zmalloc and malloc are the same.\n\nThis patch changes to a more secure model which will catch\n(and crash) programs that reuse memory already freed.\n\nThis supersedes earlier changes to zero memory on free and\navoid zeroing memory in zmalloc.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_eal/common/malloc_elem.c | 5 ++++-\n lib/librte_eal/common/rte_malloc.c  | 6 +++++-\n 2 files changed, 9 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c\nindex efcb82677198..62cc0b385c0c 100644\n--- a/lib/librte_eal/common/malloc_elem.c\n+++ b/lib/librte_eal/common/malloc_elem.c\n@@ -23,6 +23,8 @@\n #include \"malloc_elem.h\"\n #include \"malloc_heap.h\"\n \n+#define MALLOC_POISON\t       0x6b\t\t     /**< Free memory. */\n+\n size_t\n malloc_elem_find_max_iova_contig(struct malloc_elem *elem, size_t align)\n {\n@@ -531,7 +533,8 @@ malloc_elem_free(struct malloc_elem *elem)\n \t/* decrease heap's count of allocated elements */\n \telem->heap->alloc_count--;\n \n-\tmemset(ptr, 0, data_len);\n+\t/* poison memory */\n+\tmemset(ptr, MALLOC_POISON, data_len);\n \n \treturn elem;\n }\ndiff --git a/lib/librte_eal/common/rte_malloc.c b/lib/librte_eal/common/rte_malloc.c\nindex b51a6d111bde..b33c936fd491 100644\n--- a/lib/librte_eal/common/rte_malloc.c\n+++ b/lib/librte_eal/common/rte_malloc.c\n@@ -70,7 +70,11 @@ rte_malloc(const char *type, size_t size, unsigned align)\n void *\n rte_zmalloc_socket(const char *type, size_t size, unsigned align, int socket)\n {\n-\treturn rte_malloc_socket(type, size, align, socket);\n+\tvoid *ptr = rte_malloc_socket(type, size, align, socket);\n+\n+\tif (ptr != NULL)\n+\t\tmemset(ptr, 0, size);\n+\treturn ptr;\n }\n \n /*\n",
    "prefixes": [
        "RFC"
    ]
}