get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 810200,
    "url": "http://patchwork.ozlabs.org/api/patches/810200/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170905153123.13209-1-jakub.kicinski@netronome.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": "<20170905153123.13209-1-jakub.kicinski@netronome.com>",
    "list_archive_url": null,
    "date": "2017-09-05T15:31:23",
    "name": "[net,v2] net: sched: don't use GFP_KERNEL under spin lock",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "996fb81ee2413f429947e1fa2254fff8d21d9748",
    "submitter": {
        "id": 67484,
        "url": "http://patchwork.ozlabs.org/api/people/67484/?format=api",
        "name": "Jakub Kicinski",
        "email": "jakub.kicinski@netronome.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/20170905153123.13209-1-jakub.kicinski@netronome.com/mbox/",
    "series": [
        {
            "id": 1598,
            "url": "http://patchwork.ozlabs.org/api/series/1598/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=1598",
            "date": "2017-09-05T15:31:23",
            "name": "[net,v2] net: sched: don't use GFP_KERNEL under spin lock",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/1598/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/810200/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/810200/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>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=netronome-com.20150623.gappssmtp.com\n\theader.i=@netronome-com.20150623.gappssmtp.com\n\theader.b=\"jffgKomj\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xmrL558J0z9s8J\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  6 Sep 2017 01:31:57 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752034AbdIEPby (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 5 Sep 2017 11:31:54 -0400",
            "from mail-pg0-f46.google.com ([74.125.83.46]:36439 \"EHLO\n\tmail-pg0-f46.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750858AbdIEPbx (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Tue, 5 Sep 2017 11:31:53 -0400",
            "by mail-pg0-f46.google.com with SMTP id m9so10092722pgd.3\n\tfor <netdev@vger.kernel.org>; Tue, 05 Sep 2017 08:31:53 -0700 (PDT)",
            "from jkicinski-Precision-T1700.netronome.com ([75.53.12.129])\n\tby smtp.gmail.com with ESMTPSA id\n\ti63sm1621529pfk.34.2017.09.05.08.31.51\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tTue, 05 Sep 2017 08:31:51 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=netronome-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id;\n\tbh=jLF6zt1cbGrOy5NODHxZDvyLT06LcKgJ2krpmiWKWGc=;\n\tb=jffgKomj6jte9VgXZoabM8mBaUUQSGSsO2o5RFdIBP8TXso1tLcXLxiHYoltqGn8Y2\n\tq6srordPNDmSOqXGUCp/lTl4RRoh7yMMem8qml+DStSPwJDCtqtcoStqHY5V6Y9NGu6j\n\tsSlmIZNENAQoSBTobCwXKNmIndRIZoBhLVNG5Fr4d/4CDFyb48S4yGzoUvQNjRRzZxCI\n\tfxhXd8Z/7papmiVBsSSuDtpAW3uzYcWyD/fhoEpwgtgiWDELpqq9BpVGYT60qf3bZdTl\n\tGzCnM639ZzclgBUIWYJy5wEXDpEW4rW6M/ij7a5uag37XduIzdzGXKthy/a8zi8bdMSH\n\tUiHA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=jLF6zt1cbGrOy5NODHxZDvyLT06LcKgJ2krpmiWKWGc=;\n\tb=tLvh1uW6fr3i6outziCuwzDCyYokQjeAM7TWiEi/HOYIkAaMYNFUOaVchCTj6kJXJj\n\tXPvZr5YtcZuVTmVFdvZFTiQ2sOffz+iVn0dn/ndGuHsJg+kcrYrdR8KV5K5dbJ1SlmaT\n\t5QyMnCW8EXTh9Ke9lqp1EAz32RdkLqWJkg9tZVzB7rtGvC/A93VI9Ex5tl7o5bHJJbZb\n\tdUhZ3ZiEMsfJgicaTrzko36BvQcKpHS/HE2ocYJaymU5k7QVNwaasA73/nnDomz5LwXi\n\tSPL2fWOnsmB2uMcsrNxFg+3QN/zccPfV4Pa99XELFxH3NqtNC4CVc00mdy0PS8eIWG7/\n\tcx1Q==",
        "X-Gm-Message-State": "AHPjjUioAYrYh/IyUtePgjCwxx/HOMgfwDUO+hp+i5FupFcCS6fubL4y\n\t4YG/FRTEVQSfg72yxNw=",
        "X-Google-Smtp-Source": "ADKCNb4Y1ks8PVi0ufhfRRt9U2+6IA8dPdoks0qbCyOdJGMQQmrXQiYHGVAcS9CzKjYle1RKp5dlVA==",
        "X-Received": "by 10.84.238.202 with SMTP id l10mr4740034pln.115.1504625512573; \n\tTue, 05 Sep 2017 08:31:52 -0700 (PDT)",
        "From": "Jakub Kicinski <jakub.kicinski@netronome.com>",
        "To": "netdev@vger.kernel.org, eric.dumazet@gmail.com",
        "Cc": "jiri@resnulli.us, Chris Mi <chrism@mellanox.com>,\n\txiyou.wangcong@gmail.com, jhs@mojatatu.com, oss-drivers@netronome.com,\n\tJakub Kicinski <jakub.kicinski@netronome.com>",
        "Subject": "[PATCH net v2] net: sched: don't use GFP_KERNEL under spin lock",
        "Date": "Tue,  5 Sep 2017 08:31:23 -0700",
        "Message-Id": "<20170905153123.13209-1-jakub.kicinski@netronome.com>",
        "X-Mailer": "git-send-email 2.14.1",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "The new TC IDR code uses GFP_KERNEL under spin lock.  Which leads\nto:\n\n[  582.621091] BUG: sleeping function called from invalid context at ../mm/slab.h:416\n[  582.629721] in_atomic(): 1, irqs_disabled(): 0, pid: 3379, name: tc\n[  582.636939] 2 locks held by tc/3379:\n[  582.641049]  #0:  (rtnl_mutex){+.+.+.}, at: [<ffffffff910354ce>] rtnetlink_rcv_msg+0x92e/0x1400\n[  582.650958]  #1:  (&(&tn->idrinfo->lock)->rlock){+.-.+.}, at: [<ffffffff9110a5e0>] tcf_idr_create+0x2f0/0x8e0\n[  582.662217] Preemption disabled at:\n[  582.662222] [<ffffffff9110a5e0>] tcf_idr_create+0x2f0/0x8e0\n[  582.672592] CPU: 9 PID: 3379 Comm: tc Tainted: G        W       4.13.0-rc7-debug-00648-g43503a79b9f0 #287\n[  582.683432] Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS 2.3.4 11/08/2016\n[  582.691937] Call Trace:\n...\n[  582.742460]  kmem_cache_alloc+0x286/0x540\n[  582.747055]  radix_tree_node_alloc.constprop.6+0x4a/0x450\n[  582.753209]  idr_get_free_cmn+0x627/0xf80\n...\n[  582.815525]  idr_alloc_cmn+0x1a8/0x270\n...\n[  582.833804]  tcf_idr_create+0x31b/0x8e0\n...\n\nTry to preallocate the memory with idr_prealloc(GFP_KERNEL)\n(as suggested by Eric Dumazet), and change the allocation \nflags under spin lock.\n\nFixes: 65a206c01e8e (\"net/sched: Change act_api and act_xxx modules to use IDR\")\nSigned-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>\nReviewed-by: Simon Horman <simon.horman@netronome.com>\n---\n net/sched/act_api.c | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/net/sched/act_api.c b/net/sched/act_api.c\nindex 0eb545bcb247..a306974e2fb4 100644\n--- a/net/sched/act_api.c\n+++ b/net/sched/act_api.c\n@@ -296,10 +296,12 @@ int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est,\n \tspin_lock_init(&p->tcfa_lock);\n \t/* user doesn't specify an index */\n \tif (!index) {\n+\t\tidr_preload(GFP_KERNEL);\n \t\tspin_lock_bh(&idrinfo->lock);\n \t\terr = idr_alloc_ext(idr, NULL, &idr_index, 1, 0,\n-\t\t\t\t    GFP_KERNEL);\n+\t\t\t\t    GFP_ATOMIC);\n \t\tspin_unlock_bh(&idrinfo->lock);\n+\t\tidr_preload_end();\n \t\tif (err) {\n err3:\n \t\t\tfree_percpu(p->cpu_qstats);\n@@ -307,10 +309,12 @@ int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est,\n \t\t}\n \t\tp->tcfa_index = idr_index;\n \t} else {\n+\t\tidr_preload(GFP_KERNEL);\n \t\tspin_lock_bh(&idrinfo->lock);\n \t\terr = idr_alloc_ext(idr, NULL, NULL, index, index + 1,\n-\t\t\t\t    GFP_KERNEL);\n+\t\t\t\t    GFP_ATOMIC);\n \t\tspin_unlock_bh(&idrinfo->lock);\n+\t\tidr_preload_end();\n \t\tif (err)\n \t\t\tgoto err3;\n \t\tp->tcfa_index = index;\n",
    "prefixes": [
        "net",
        "v2"
    ]
}