get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 805932,
    "url": "http://patchwork.ozlabs.org/api/patches/805932/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/a24249adef0fe79cf7405fa84d798e67b642c8a9.1503671776.git.g.nault@alphalink.fr/",
    "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": "<a24249adef0fe79cf7405fa84d798e67b642c8a9.1503671776.git.g.nault@alphalink.fr>",
    "list_archive_url": null,
    "date": "2017-08-25T14:51:42",
    "name": "[net,3/5] l2tp: hold tunnel while handling genl tunnel updates",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "6491f5364c15423edbd307597706995ca9d16d1a",
    "submitter": {
        "id": 22975,
        "url": "http://patchwork.ozlabs.org/api/people/22975/?format=api",
        "name": "Guillaume Nault",
        "email": "g.nault@alphalink.fr"
    },
    "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/a24249adef0fe79cf7405fa84d798e67b642c8a9.1503671776.git.g.nault@alphalink.fr/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/805932/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/805932/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 3xf3zG2mYPz9sN5\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 26 Aug 2017 00:52:10 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1757304AbdHYOwI (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 25 Aug 2017 10:52:08 -0400",
            "from zimbra.alphalink.fr ([217.15.80.77]:53425 \"EHLO\n\tzimbra.alphalink.fr\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1757282AbdHYOvu (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 25 Aug 2017 10:51:50 -0400",
            "from localhost (localhost [127.0.0.1])\n\tby mail-2-cbv2.admin.alphalink.fr (Postfix) with ESMTP id\n\t9174A2B5206F; Fri, 25 Aug 2017 16:51:49 +0200 (CEST)",
            "from zimbra.alphalink.fr ([127.0.0.1])\n\tby localhost (mail-2-cbv2.admin.alphalink.fr [127.0.0.1])\n\t(amavisd-new, port 10032)\n\twith ESMTP id WFqX4UlizPFc; Fri, 25 Aug 2017 16:51:43 +0200 (CEST)",
            "from localhost (localhost [127.0.0.1])\n\tby mail-2-cbv2.admin.alphalink.fr (Postfix) with ESMTP id\n\t4F11D2B5214B; Fri, 25 Aug 2017 16:51:43 +0200 (CEST)",
            "from zimbra.alphalink.fr ([127.0.0.1])\n\tby localhost (mail-2-cbv2.admin.alphalink.fr [127.0.0.1])\n\t(amavisd-new, port 10026)\n\twith ESMTP id 4Il05nGXAA0i; Fri, 25 Aug 2017 16:51:43 +0200 (CEST)",
            "from c-dev-0.admin.alphalink.fr (94-84-15-217.reverse.alphalink.fr\n\t[217.15.84.94])\n\tby mail-2-cbv2.admin.alphalink.fr (Postfix) with ESMTP id\n\t22FC62B5206F; Fri, 25 Aug 2017 16:51:43 +0200 (CEST)",
            "by c-dev-0.admin.alphalink.fr (Postfix, from userid 1000)\n\tid 072C86024C; Fri, 25 Aug 2017 16:51:42 +0200 (CEST)"
        ],
        "X-Virus-Scanned": "amavisd-new at mail-2-cbv2.admin.alphalink.fr",
        "Date": "Fri, 25 Aug 2017 16:51:42 +0200",
        "From": "Guillaume Nault <g.nault@alphalink.fr>",
        "To": "netdev@vger.kernel.org",
        "Cc": "James Chapman <jchapman@katalix.com>",
        "Subject": "[PATCH net 3/5] l2tp: hold tunnel while handling genl tunnel updates",
        "Message-ID": "<a24249adef0fe79cf7405fa84d798e67b642c8a9.1503671776.git.g.nault@alphalink.fr>",
        "References": "<cover.1503671776.git.g.nault@alphalink.fr>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Disposition": "inline",
        "In-Reply-To": "<cover.1503671776.git.g.nault@alphalink.fr>",
        "X-Mutt-Fcc": "=Sent",
        "User-Agent": "NeoMutt/20170609 (1.8.3)",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "We need to make sure the tunnel is not going to be destroyed by\nl2tp_tunnel_destruct() concurrently.\n\nFixes: 309795f4bec2 (\"l2tp: Add netlink control API for L2TP\")\nSigned-off-by: Guillaume Nault <g.nault@alphalink.fr>\n---\n net/l2tp/l2tp_netlink.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c\nindex 808966550620..d61e75b4e619 100644\n--- a/net/l2tp/l2tp_netlink.c\n+++ b/net/l2tp/l2tp_netlink.c\n@@ -303,8 +303,8 @@ static int l2tp_nl_cmd_tunnel_modify(struct sk_buff *skb, struct genl_info *info\n \t}\n \ttunnel_id = nla_get_u32(info->attrs[L2TP_ATTR_CONN_ID]);\n \n-\ttunnel = l2tp_tunnel_find(net, tunnel_id);\n-\tif (tunnel == NULL) {\n+\ttunnel = l2tp_tunnel_get(net, tunnel_id);\n+\tif (!tunnel) {\n \t\tret = -ENODEV;\n \t\tgoto out;\n \t}\n@@ -315,6 +315,8 @@ static int l2tp_nl_cmd_tunnel_modify(struct sk_buff *skb, struct genl_info *info\n \tret = l2tp_tunnel_notify(&l2tp_nl_family, info,\n \t\t\t\t tunnel, L2TP_CMD_TUNNEL_MODIFY);\n \n+\tl2tp_tunnel_dec_refcount(tunnel);\n+\n out:\n \treturn ret;\n }\n",
    "prefixes": [
        "net",
        "3/5"
    ]
}