get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 4972,
    "url": "http://patches.dpdk.org/api/patches/4972/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1432895688-1728-1-git-send-email-jblunck@infradead.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": "<1432895688-1728-1-git-send-email-jblunck@infradead.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1432895688-1728-1-git-send-email-jblunck@infradead.org",
    "date": "2015-05-29T10:34:48",
    "name": "[dpdk-dev] log: Properly reset log_history_size in rte_log_dump_history()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7626b1b7e298ab7a4452582246fe9d1a3dfb6652",
    "submitter": {
        "id": 249,
        "url": "http://patches.dpdk.org/api/people/249/?format=api",
        "name": "Jan Blunck",
        "email": "jblunck@infradead.org"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1432895688-1728-1-git-send-email-jblunck@infradead.org/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/4972/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/4972/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 4DB355A96;\n\tFri, 29 May 2015 12:35:27 +0200 (CEST)",
            "from mail-wi0-f179.google.com (mail-wi0-f179.google.com\n\t[209.85.212.179]) by dpdk.org (Postfix) with ESMTP id CE45658E4\n\tfor <dev@dpdk.org>; Fri, 29 May 2015 12:35:25 +0200 (CEST)",
            "by wizo1 with SMTP id o1so18063009wiz.1\n\tfor <dev@dpdk.org>; Fri, 29 May 2015 03:35:25 -0700 (PDT)",
            "from linux-04uu.site.eng.vyatta.net\n\t(port-92-196-75-134.dynamic.qsc.de. [92.196.75.134])\n\tby mx.google.com with ESMTPSA id\n\tny7sm2463585wic.11.2015.05.29.03.35.24 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 29 May 2015 03:35:25 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\n\th=sender:from:to:subject:date:message-id;\n\tbh=BTBbDKfMcNtJyDkE+oYJCGnaLicmoq8NGeFczomseZM=;\n\tb=HqmDRAFpHJtHIRSJkvsrWwU5lfuBkSho2+kcahR09Zzub0BSwrCT+WyfR9s3ewtQ8f\n\tDLr6bv/aSzx2fJnjE/ZYNnIoPxL9/H1WfV/BbPN+9gv5qZm4GYYQ0JZlO8xP0eaJw8GO\n\tUvhcYVq+g6hrrt74ZuazDYMcK0qlotp3B3uQ7TmEg1abHV+7gI4Hg3/4/g3BvO+EX9B2\n\tkp7S0Iby27kfbwJk0AC4bQtFdndldm7/NIrRNFGhKreSEaCCsGbfhMqHxPdpLgpuPfj6\n\tqyszaPF9mIpJGaz9FVyhx07InB5HZW8yen61oJU5jFyrQPsG6OYc9gzUlasArTJXeRqg\n\tiHMQ==",
        "X-Received": "by 10.180.14.193 with SMTP id r1mr5015645wic.47.1432895725657;\n\tFri, 29 May 2015 03:35:25 -0700 (PDT)",
        "From": "Jan Blunck <jblunck@infradead.org>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 29 May 2015 12:34:48 +0200",
        "Message-Id": "<1432895688-1728-1-git-send-email-jblunck@infradead.org>",
        "X-Mailer": "git-send-email 2.1.4",
        "Subject": "[dpdk-dev] [PATCH] log: Properly reset log_history_size in\n\trte_log_dump_history()",
        "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": "In rte_log_dump_history() the log_history list is reinitialized without\nresetting the log_history_size. In the next call to rte_log_add_in_history()\nthe log_history_size > RTE_LOG_HISTORY and the code unconditionally tries\nto remove the first entry:\n\nProgram received signal SIGSEGV, Segmentation fault.\nrte_log_add_in_history (\n    buf=buf@entry=0x7f02035cd000 \"DATAPLANE: 9:dp0s7 link RTM_NEWLINK [dp0s7] <UP,BROADCAST,RUNNING,MULTICAST,LOWER_UP>\\nCAST,LOWER_UP>\\n\", size=size@entry=86)\n    at /usr/src/packages/BUILD/lib/librte_eal/common/eal_common_log.c:122\n\nSigned-off-by: Jan Blunck <jblunck@infradead.org>\n---\n lib/librte_eal/common/eal_common_log.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c\nindex fe3d7d5..cb4311c 100644\n--- a/lib/librte_eal/common/eal_common_log.c\n+++ b/lib/librte_eal/common/eal_common_log.c\n@@ -119,7 +119,8 @@ rte_log_add_in_history(const char *buf, size_t size)\n \t/* get a buffer for adding in history */\n \tif (log_history_size > RTE_LOG_HISTORY) {\n \t\thist_buf = STAILQ_FIRST(&log_history);\n-\t\tSTAILQ_REMOVE_HEAD(&log_history, next);\n+\t\tif (hist_buf)\n+\t\t\tSTAILQ_REMOVE_HEAD(&log_history, next);\n \t}\n \telse {\n \t\tif (rte_mempool_mc_get(log_history_mp, &obj) < 0)\n@@ -234,6 +235,7 @@ rte_log_dump_history(FILE *out)\n \trte_spinlock_lock(&log_list_lock);\n \ttmp_log_history = log_history;\n \tSTAILQ_INIT(&log_history);\n+\tlog_history_size = 0;\n \trte_spinlock_unlock(&log_list_lock);\n \n \tfor (i=0; i<RTE_LOG_HISTORY; i++) {\n",
    "prefixes": [
        "dpdk-dev"
    ]
}