get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 897240,
    "url": "http://patchwork.ozlabs.org/api/patches/897240/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1523412498-2177-1-git-send-email-baijiaju1990@gmail.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1523412498-2177-1-git-send-email-baijiaju1990@gmail.com>",
    "list_archive_url": null,
    "date": "2018-04-11T02:08:18",
    "name": "intel: i40evf: Replace GFP_ATOMIC with GFP_KERNEL in i40evf_add_vlan",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "44a8bc355bd44b0cc25b1fdb1bd017616a780f63",
    "submitter": {
        "id": 73020,
        "url": "http://patchwork.ozlabs.org/api/people/73020/?format=api",
        "name": "Jia-Ju Bai",
        "email": "baijiaju1990@gmail.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1523412498-2177-1-git-send-email-baijiaju1990@gmail.com/mbox/",
    "series": [
        {
            "id": 38468,
            "url": "http://patchwork.ozlabs.org/api/series/38468/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=38468",
            "date": "2018-04-11T02:08:18",
            "name": "intel: i40evf: Replace GFP_ATOMIC with GFP_KERNEL in i40evf_add_vlan",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/38468/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/897240/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/897240/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=gmail.com",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"AkUjoTHA\"; dkim-atps=neutral"
        ],
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 40Lp4q6qHFz9s0n\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 12 Apr 2018 01:34:51 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id B88CA880F5;\n\tWed, 11 Apr 2018 15:34:49 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id IiIt8Nj+YdVZ; Wed, 11 Apr 2018 15:34:49 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 2E8CD880CE;\n\tWed, 11 Apr 2018 15:34:49 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 1B8021CF12D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 11 Apr 2018 02:08:31 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 17E8B85ED8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 11 Apr 2018 02:08:31 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id wWoiI6tiq9aS for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 11 Apr 2018 02:08:30 +0000 (UTC)",
            "from mail-pg0-f67.google.com (mail-pg0-f67.google.com\n\t[74.125.83.67])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 9897885EC9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 11 Apr 2018 02:08:30 +0000 (UTC)",
            "by mail-pg0-f67.google.com with SMTP id j3so71336pgf.2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 10 Apr 2018 19:08:30 -0700 (PDT)",
            "from oslab.tsinghua.edu.cn ([2402:f000:1:4413:edc8:c1dd:b0a8:461d])\n\tby smtp.gmail.com with ESMTPSA id\n\tb65sm88382pfl.145.2018.04.10.19.08.27\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tTue, 10 Apr 2018 19:08:29 -0700 (PDT)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=s75UFnNaqV2x3ZRMCYd+xL6M6Iz2R7OBynTIzAOACow=;\n\tb=AkUjoTHAeWhlYWQyAyZis0AB8B4W8D+WR3Hdx9NFOoJ44HzsQHnykJUK6GR5dyoxVh\n\t41AmFOYem3onfmRSGOAJSVUhICoD2mVVa5QeIHGYwEM17IrZqwLGR4AGDq24N+Eb0/h1\n\tDl0omdOxlXkmAC5P5WGD9eoE3Sgo1GeSXDPJZSu5efOvTeissn4lRJo27/bS9QskHv0y\n\tZU9Ly40pcik64dpJzS8F7jU1D05YgahSZB7eGY9RiUO5b1aIVnyv3UstSObkgfTqdIqe\n\tkBTcdVCG1ToSqqLAkzlWTC0LA1Uafsg/vIBuAT5hL6uBudtNnXGT6F54DFb4WMfbgLWd\n\tYKng==",
        "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=s75UFnNaqV2x3ZRMCYd+xL6M6Iz2R7OBynTIzAOACow=;\n\tb=XKzFRV4xzz2mJoCMw7LahIVkOOkJzDglGaju0hRCzv4TCpCPqbdReOof6YTp0bTFto\n\tj4u/O5i/q01g+pQzQyiBNF0vIL+3quNcSIjLAVlun+mMKGywVdBqpz6bgw3tFBpkWU3I\n\tAszCVEfwgCQvhGJWcmRmOHB1SD/ysD/+26FiwylcKVwkq8L+MJ4rE29j6vJiVtRuzEdj\n\t+D2bi8nykjwxqi/R/HLHUXboOPOHScq1n0Xcz88n0frsEAji+ADN7S2F6VsiqC44Lgu8\n\t2qI5rhdaj6/7gXffASXcuIeBVqmCaMaFCoNMk/RjuuuZ4znFLh1J+Meaq/5bbi369pBL\n\tCqpA==",
        "X-Gm-Message-State": "ALQs6tA5ysouBCm8L8oX7h/6YPNtuzzPdwHZEyFp8vCrpOz4ZMsdbD5u\n\tjAnVLqzk2QL6WtYMwE3izko=",
        "X-Google-Smtp-Source": "AIpwx4/UtcO9lPWvpPiQtaKEs99SdYTQQp56XgDyGgGlP5F/bRtjqB8m3DJI6Na0K8TuZ6LQu+8o9g==",
        "X-Received": "by 10.98.141.78 with SMTP id z75mr2338455pfd.174.1523412510286; \n\tTue, 10 Apr 2018 19:08:30 -0700 (PDT)",
        "From": "Jia-Ju Bai <baijiaju1990@gmail.com>",
        "To": "jeffrey.t.kirsher@intel.com",
        "Date": "Wed, 11 Apr 2018 10:08:18 +0800",
        "Message-Id": "<1523412498-2177-1-git-send-email-baijiaju1990@gmail.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "X-Mailman-Approved-At": "Wed, 11 Apr 2018 15:34:48 +0000",
        "Subject": "[Intel-wired-lan] [PATCH] intel: i40evf: Replace GFP_ATOMIC with\n\tGFP_KERNEL in i40evf_add_vlan",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.24",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Cc": "netdev@vger.kernel.org, Jia-Ju Bai <baijiaju1990@gmail.com>,\n\tintel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "i40evf_add_vlan() is never called in atomic context.\n\ni40evf_add_vlan() is only called by i40evf_vlan_rx_add_vid(), \nwhich is only set as \".ndo_vlan_rx_add_vid\" in struct net_device_ops.\n\".ndo_vlan_rx_add_vid\" is not called in atomic context.\n\nDespite never getting called from atomic context, \ni40evf_add_vlan() calls kzalloc() with GFP_ATOMIC, \nwhich does not sleep for allocation.\nGFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, \nwhich can sleep and improve the possibility of sucessful allocation.\n\nThis is found by a static analysis tool named DCNS written by myself.\nAnd I also manually check it.\n\nSigned-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>\n---\n drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex 1825d95..04b2b9c 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -770,7 +770,7 @@ i40evf_vlan_filter *i40evf_add_vlan(struct i40evf_adapter *adapter, u16 vlan)\n \n \tf = i40evf_find_vlan(adapter, vlan);\n \tif (!f) {\n-\t\tf = kzalloc(sizeof(*f), GFP_ATOMIC);\n+\t\tf = kzalloc(sizeof(*f), GFP_KERNEL);\n \t\tif (!f)\n \t\t\tgoto clearout;\n \n",
    "prefixes": []
}