get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 810569,
    "url": "http://patchwork.ozlabs.org/api/patches/810569/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1d0596e2a1926e7c0e8c7f691ef42c713daa3396.1504701206.git.pabeni@redhat.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": "<1d0596e2a1926e7c0e8c7f691ef42c713daa3396.1504701206.git.pabeni@redhat.com>",
    "list_archive_url": null,
    "date": "2017-09-06T12:44:36",
    "name": "[net] udp: drop head states only when all skb references are gone",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "33fd75f06344f9290e659cfddc4f4c9f52d2e6f0",
    "submitter": {
        "id": 67312,
        "url": "http://patchwork.ozlabs.org/api/people/67312/?format=api",
        "name": "Paolo Abeni",
        "email": "pabeni@redhat.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/1d0596e2a1926e7c0e8c7f691ef42c713daa3396.1504701206.git.pabeni@redhat.com/mbox/",
    "series": [
        {
            "id": 1791,
            "url": "http://patchwork.ozlabs.org/api/series/1791/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=1791",
            "date": "2017-09-06T12:44:36",
            "name": "[net] udp: drop head states only when all skb references are gone",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/1791/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/810569/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/810569/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>)",
            "ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com",
            "ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=pabeni@redhat.com"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnNb3537Tz9sRV\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  6 Sep 2017 22:45:03 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753993AbdIFMpB (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 6 Sep 2017 08:45:01 -0400",
            "from mx1.redhat.com ([209.132.183.28]:54227 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1753828AbdIFMpA (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tWed, 6 Sep 2017 08:45:00 -0400",
            "from smtp.corp.redhat.com\n\t(int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 4295F7E434;\n\tWed,  6 Sep 2017 12:45:00 +0000 (UTC)",
            "from localhost.mxp.redhat.com (unknown [10.32.181.112])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id A1A6B4DA0A;\n\tWed,  6 Sep 2017 12:44:58 +0000 (UTC)"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 4295F7E434",
        "From": "Paolo Abeni <pabeni@redhat.com>",
        "To": "netdev@vger.kernel.org",
        "Cc": "\"David S. Miller\" <davem@davemloft.net>,\n\tEric Dumazet <edumazet@google.com>,\n\tHannes Frederic Sowa <hannes@stressinduktion.org>",
        "Subject": "[PATCH net] udp: drop head states only when all skb references are\n\tgone",
        "Date": "Wed,  6 Sep 2017 14:44:36 +0200",
        "Message-Id": "<1d0596e2a1926e7c0e8c7f691ef42c713daa3396.1504701206.git.pabeni@redhat.com>",
        "In-Reply-To": "<1504631927.15310.47.camel@edumazet-glaptop3.roam.corp.google.com>",
        "References": "<1504631927.15310.47.camel@edumazet-glaptop3.roam.corp.google.com>",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.16",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.27]);\n\tWed, 06 Sep 2017 12:45:00 +0000 (UTC)",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "After commit 0ddf3fb2c43d (\"udp: preserve skb->dst if required\nfor IP options processing\") we clear the skb head state as soon\nas the skb carrying them is first processed.\n\nSince the same skb can be processed several times when MSG_PEEK\nis used, we can end up lacking the required head states, and\neventually oopsing.\n\nFix this clearing the skb head state only when processing the\nlast skb reference.\n\nReported-by: Eric Dumazet <edumazet@google.com>\nFixes: 0ddf3fb2c43d (\"udp: preserve skb->dst if required for IP options processing\")\nSigned-off-by: Paolo Abeni <pabeni@redhat.com>\n---\n include/linux/skbuff.h | 2 +-\n net/core/skbuff.c      | 9 +++------\n net/ipv4/udp.c         | 5 ++++-\n 3 files changed, 8 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h\nindex d67a8182e5eb..63df75ae70ee 100644\n--- a/include/linux/skbuff.h\n+++ b/include/linux/skbuff.h\n@@ -885,7 +885,7 @@ void kfree_skb(struct sk_buff *skb);\n void kfree_skb_list(struct sk_buff *segs);\n void skb_tx_error(struct sk_buff *skb);\n void consume_skb(struct sk_buff *skb);\n-void consume_stateless_skb(struct sk_buff *skb);\n+void __consume_stateless_skb(struct sk_buff *skb);\n void  __kfree_skb(struct sk_buff *skb);\n extern struct kmem_cache *skbuff_head_cache;\n \ndiff --git a/net/core/skbuff.c b/net/core/skbuff.c\nindex e07556606284..72eb23d2426f 100644\n--- a/net/core/skbuff.c\n+++ b/net/core/skbuff.c\n@@ -753,14 +753,11 @@ EXPORT_SYMBOL(consume_skb);\n  *\tconsume_stateless_skb - free an skbuff, assuming it is stateless\n  *\t@skb: buffer to free\n  *\n- *\tWorks like consume_skb(), but this variant assumes that all the head\n- *\tstates have been already dropped.\n+ *\tAlike consume_skb(), but this variant assumes that this is the last\n+ *\tskb reference and all the head states have been already dropped\n  */\n-void consume_stateless_skb(struct sk_buff *skb)\n+void __consume_stateless_skb(struct sk_buff *skb)\n {\n-\tif (!skb_unref(skb))\n-\t\treturn;\n-\n \ttrace_consume_skb(skb);\n \tif (likely(skb->head))\n \t\tskb_release_data(skb);\ndiff --git a/net/ipv4/udp.c b/net/ipv4/udp.c\nindex 62344804baae..979e4d8526ba 100644\n--- a/net/ipv4/udp.c\n+++ b/net/ipv4/udp.c\n@@ -1386,12 +1386,15 @@ void skb_consume_udp(struct sock *sk, struct sk_buff *skb, int len)\n \t\tunlock_sock_fast(sk, slow);\n \t}\n \n+\tif (!skb_unref(skb))\n+\t\treturn;\n+\n \t/* In the more common cases we cleared the head states previously,\n \t * see __udp_queue_rcv_skb().\n \t */\n \tif (unlikely(udp_skb_has_head_state(skb)))\n \t\tskb_release_head_state(skb);\n-\tconsume_stateless_skb(skb);\n+\t__consume_stateless_skb(skb);\n }\n EXPORT_SYMBOL_GPL(skb_consume_udp);\n \n",
    "prefixes": [
        "net"
    ]
}