get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 806324,
    "url": "http://patchwork.ozlabs.org/api/patches/806324/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170828001603.75876-4-jeffrey.t.kirsher@intel.com/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170828001603.75876-4-jeffrey.t.kirsher@intel.com>",
    "list_archive_url": null,
    "date": "2017-08-28T00:15:51",
    "name": "[net-next,03/15] i40e: prevent snprintf format specifier truncation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "60960ecc71618c73496bdc44899e0c2d32023dfe",
    "submitter": {
        "id": 473,
        "url": "http://patchwork.ozlabs.org/api/people/473/?format=api",
        "name": "Kirsher, Jeffrey T",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20170828001603.75876-4-jeffrey.t.kirsher@intel.com/mbox/",
    "series": [
        {
            "id": 52,
            "url": "http://patchwork.ozlabs.org/api/series/52/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=52",
            "date": "2017-08-28T00:15:49",
            "name": "40GbE Intel Wired LAN Driver Updates 2017-08-27",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/52/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/806324/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/806324/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xgXQP5yLGz9s7v\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 28 Aug 2017 10:17:17 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751839AbdH1ARQ (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSun, 27 Aug 2017 20:17:16 -0400",
            "from mga14.intel.com ([192.55.52.115]:47467 \"EHLO mga14.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751646AbdH1AQS (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tSun, 27 Aug 2017 20:16:18 -0400",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t27 Aug 2017 17:16:18 -0700",
            "from davidpwo-mobl1.amr.corp.intel.com (HELO\n\tjtkirshe-DESK.amr.corp.intel.com.com) ([10.254.22.134])\n\tby fmsmga004.fm.intel.com with ESMTP; 27 Aug 2017 17:16:17 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.41,439,1498546800\"; d=\"scan'208\";a=\"304981058\"",
        "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "To": "davem@davemloft.net",
        "Cc": "Jacob Keller <jacob.e.keller@intel.com>, netdev@vger.kernel.org,\n\tnhorman@redhat.com, sassmann@redhat.com, jogreene@redhat.com,\n\tJeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "Subject": "[net-next 03/15] i40e: prevent snprintf format specifier truncation",
        "Date": "Sun, 27 Aug 2017 17:15:51 -0700",
        "Message-Id": "<20170828001603.75876-4-jeffrey.t.kirsher@intel.com>",
        "X-Mailer": "git-send-email 2.14.1",
        "In-Reply-To": "<20170828001603.75876-1-jeffrey.t.kirsher@intel.com>",
        "References": "<20170828001603.75876-1-jeffrey.t.kirsher@intel.com>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "From: Jacob Keller <jacob.e.keller@intel.com>\n\nIncrease the size of the prefix buffer so that it can hold enough\ncharacters for every possible input. Although 20 is enough for all\nexpected inputs, it is possible for the values to be larger than\nexpected, resulting in a possibly truncated string. Additionally, lets\nuse sizeof(prefix) in order to ensure we use the correct size if we need\nto change the array length in the future.\n\nNew versions of GCC starting at 7 now include warnings to prevent\ntruncation unless you handle the return code. At most 27 bytes can be\nwritten here, so lets just increase the buffer size even if for all\nexpected hw->bus.* values we only needed 20.\n\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\nTested-by: Andrew Bowers <andrewx.bowers@intel.com>\nSigned-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_common.c   | 4 ++--\n drivers/net/ethernet/intel/i40evf/i40e_common.c | 4 ++--\n 2 files changed, 4 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c\nindex 5c36a18a31be..111426ba5fbc 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_common.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c\n@@ -328,9 +328,9 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,\n \t\t\tlen = buf_len;\n \t\t/* write the full 16-byte chunks */\n \t\tif (hw->debug_mask & mask) {\n-\t\t\tchar prefix[20];\n+\t\t\tchar prefix[27];\n \n-\t\t\tsnprintf(prefix, 20,\n+\t\t\tsnprintf(prefix, sizeof(prefix),\n \t\t\t\t \"i40e %02x:%02x.%x: \\t0x\",\n \t\t\t\t hw->bus.bus_id,\n \t\t\t\t hw->bus.device,\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_common.c b/drivers/net/ethernet/intel/i40evf/i40e_common.c\nindex d69c2e44cd1a..8d3a2bfe186a 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_common.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_common.c\n@@ -333,9 +333,9 @@ void i40evf_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,\n \t\t\tlen = buf_len;\n \t\t/* write the full 16-byte chunks */\n \t\tif (hw->debug_mask & mask) {\n-\t\t\tchar prefix[20];\n+\t\t\tchar prefix[27];\n \n-\t\t\tsnprintf(prefix, 20,\n+\t\t\tsnprintf(prefix, sizeof(prefix),\n \t\t\t\t \"i40evf %02x:%02x.%x: \\t0x\",\n \t\t\t\t hw->bus.bus_id,\n \t\t\t\t hw->bus.device,\n",
    "prefixes": [
        "net-next",
        "03/15"
    ]
}