get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 808549,
    "url": "http://patchwork.ozlabs.org/api/patches/808549/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1504251046-17106-3-git-send-email-steffen.klassert@secunet.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": "<1504251046-17106-3-git-send-email-steffen.klassert@secunet.com>",
    "list_archive_url": null,
    "date": "2017-09-01T07:30:46",
    "name": "[2/2] xfrm: Fix return value check of copy_sec_ctx.",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "1fbea4b7caa1b12902b065a691f77c129183fbc7",
    "submitter": {
        "id": 1442,
        "url": "http://patchwork.ozlabs.org/api/people/1442/?format=api",
        "name": "Steffen Klassert",
        "email": "steffen.klassert@secunet.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/1504251046-17106-3-git-send-email-steffen.klassert@secunet.com/mbox/",
    "series": [
        {
            "id": 962,
            "url": "http://patchwork.ozlabs.org/api/series/962/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=962",
            "date": "2017-09-01T07:30:44",
            "name": "pull request (net-next): ipsec-next 2017-09-01",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/962/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808549/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808549/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 3xk9s50q1wz9s83\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 17:31:05 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751558AbdIAHbD (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 1 Sep 2017 03:31:03 -0400",
            "from a.mx.secunet.com ([62.96.220.36]:50296 \"EHLO a.mx.secunet.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751413AbdIAHaw (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tFri, 1 Sep 2017 03:30:52 -0400",
            "from localhost (localhost [127.0.0.1])\n\tby a.mx.secunet.com (Postfix) with ESMTP id DC58920063;\n\tFri,  1 Sep 2017 09:30:51 +0200 (CEST)",
            "from a.mx.secunet.com ([127.0.0.1])\n\tby localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id zPOG2MS9KEv2; Fri,  1 Sep 2017 09:30:51 +0200 (CEST)",
            "from mail-essen-01.secunet.de (mail-essen-01.secunet.de\n\t[10.53.40.204])\n\t(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby a.mx.secunet.com (Postfix) with ESMTPS id 658502018C;\n\tFri,  1 Sep 2017 09:30:51 +0200 (CEST)",
            "from gauss2.secunet.de (10.182.7.193) by mail-essen-01.secunet.de\n\t(10.53.40.204) with Microsoft SMTP Server id 14.3.361.1;\n\tFri, 1 Sep 2017 09:30:50 +0200",
            "by gauss2.secunet.de (Postfix, from userid 1000) id 6DE1E14062E;\n\tFri,  1 Sep 2017 09:30:50 +0200 (CEST)"
        ],
        "X-Virus-Scanned": "by secunet",
        "From": "Steffen Klassert <steffen.klassert@secunet.com>",
        "To": "David Miller <davem@davemloft.net>",
        "CC": "Herbert Xu <herbert@gondor.apana.org.au>,\n\tSteffen Klassert <steffen.klassert@secunet.com>, <netdev@vger.kernel.org>",
        "Subject": "[PATCH 2/2] xfrm: Fix return value check of copy_sec_ctx.",
        "Date": "Fri, 1 Sep 2017 09:30:46 +0200",
        "Message-ID": "<1504251046-17106-3-git-send-email-steffen.klassert@secunet.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1504251046-17106-1-git-send-email-steffen.klassert@secunet.com>",
        "References": "<1504251046-17106-1-git-send-email-steffen.klassert@secunet.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-G-Data-MailSecurity-for-Exchange-State": "0",
        "X-G-Data-MailSecurity-for-Exchange-Error": "0",
        "X-G-Data-MailSecurity-for-Exchange-Sender": "23",
        "X-G-Data-MailSecurity-for-Exchange-Server": "d65e63f7-5c15-413f-8f63-c0d707471c93",
        "X-EXCLAIMER-MD-CONFIG": "2c86f778-e09b-4440-8b15-867914633a10",
        "X-G-Data-MailSecurity-for-Exchange-Guid": "CBABD53D-8BF8-441D-9B3C-0C7F594FB029",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "A recent commit added an output_mark. When copying\nthis output_mark, the return value of copy_sec_ctx\nis overwitten without a check. Fix this by copying\nthe output_mark before the security context.\n\nFixes: 077fbac405bf (\"net: xfrm: support setting an output mark.\")\nSigned-off-by: Steffen Klassert <steffen.klassert@secunet.com>\n---\n net/xfrm/xfrm_user.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c\nindex cc3268d..490132d 100644\n--- a/net/xfrm/xfrm_user.c\n+++ b/net/xfrm/xfrm_user.c\n@@ -900,13 +900,13 @@ static int copy_to_user_state_extra(struct xfrm_state *x,\n \t\tret = copy_user_offload(&x->xso, skb);\n \tif (ret)\n \t\tgoto out;\n-\tif (x->security)\n-\t\tret = copy_sec_ctx(x->security, skb);\n \tif (x->props.output_mark) {\n \t\tret = nla_put_u32(skb, XFRMA_OUTPUT_MARK, x->props.output_mark);\n \t\tif (ret)\n \t\t\tgoto out;\n \t}\n+\tif (x->security)\n+\t\tret = copy_sec_ctx(x->security, skb);\n out:\n \treturn ret;\n }\n",
    "prefixes": [
        "2/2"
    ]
}