get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 695136,
    "url": "http://patchwork.ozlabs.org/api/patches/695136/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1479228866-15506-1-git-send-email-todd.fujinaka@intel.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": "<1479228866-15506-1-git-send-email-todd.fujinaka@intel.com>",
    "list_archive_url": null,
    "date": "2016-11-15T16:54:26",
    "name": "[v2] igb: close/suspend race in netif_device_detach",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c8a3ba996be109bb7a575e73845b08712d22a227",
    "submitter": {
        "id": 29211,
        "url": "http://patchwork.ozlabs.org/api/people/29211/?format=api",
        "name": "Fujinaka, Todd",
        "email": "todd.fujinaka@intel.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/1479228866-15506-1-git-send-email-todd.fujinaka@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/695136/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/695136/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@lists.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"
        ],
        "Received": [
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 3tJDG86nT4z9t0J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 16 Nov 2016 04:02:24 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 8D11031D20;\n\tTue, 15 Nov 2016 17:02:22 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id GWVd8C8pGCyI; Tue, 15 Nov 2016 17:02:16 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id BF2D231D14;\n\tTue, 15 Nov 2016 17:02:16 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id CF6151C2C34\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 15 Nov 2016 17:02:15 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id CA9AD94E83\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 15 Nov 2016 17:02:15 +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 yx+CXb8R0oVj for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 15 Nov 2016 17:02:15 +0000 (UTC)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 0529C94E70\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 15 Nov 2016 17:02:14 +0000 (UTC)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga104.fm.intel.com with ESMTP; 15 Nov 2016 09:02:09 -0800",
            "from htfujina-fc.jf.intel.com ([134.134.145.131])\n\tby fmsmga004.fm.intel.com with ESMTP; 15 Nov 2016 09:02:08 -0800"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.31,495,1473145200\"; d=\"scan'208\";a=\"191712815\"",
        "From": "Todd Fujinaka <todd.fujinaka@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 15 Nov 2016 08:54:26 -0800",
        "Message-Id": "<1479228866-15506-1-git-send-email-todd.fujinaka@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "Subject": "[Intel-wired-lan] [PATCH] [PATCH v2] igb: close/suspend race in\n\tnetif_device_detach",
        "X-BeenThere": "intel-wired-lan@lists.osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>",
        "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>",
        "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>"
    },
    "content": "Similar to ixgbe, when an interface is part of a namespace it is\npossible that igb_close() may be called while __igb_shutdown() is\nrunning which ends up in a double free WARN and/or a BUG in\nfree_msi_irqs().\n\nExtend the rtnl_lock() to protect the call to netif_device_detach() and\nigb_clear_interrupt_scheme() in __igb_shutdown() and check for\nnetif_device_present() to avoid calling igb_clear_interrupt_scheme() a\nsecond time in igb_close().\n\nAlso extend the rtnl lock in igb_resume() to netif_device_attach().\n\nSigned-off-by: Todd Fujinaka <todd.fujinaka@intel.com>\n---\n drivers/net/ethernet/intel/igb/igb_main.c | 21 ++++++++++++---------\n 1 file changed, 12 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex 4feca69..8b1b4dd 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -3275,7 +3275,9 @@ static int __igb_close(struct net_device *netdev, bool suspending)\n \n int igb_close(struct net_device *netdev)\n {\n-\treturn __igb_close(netdev, false);\n+\tif (netif_device_present(netdev))\n+\t\treturn __igb_close(netdev, false);\n+\treturn 0;\n }\n \n /**\n@@ -7537,6 +7539,7 @@ static int __igb_shutdown(struct pci_dev *pdev, bool *enable_wake,\n \tint retval = 0;\n #endif\n \n+\trtnl_lock();\n \tnetif_device_detach(netdev);\n \n \tif (netif_running(netdev))\n@@ -7545,6 +7548,7 @@ static int __igb_shutdown(struct pci_dev *pdev, bool *enable_wake,\n \tigb_ptp_suspend(adapter);\n \n \tigb_clear_interrupt_scheme(adapter);\n+\trtnl_unlock();\n \n #ifdef CONFIG_PM\n \tretval = pci_save_state(pdev);\n@@ -7663,16 +7667,15 @@ static int igb_resume(struct device *dev)\n \n \twr32(E1000_WUS, ~0);\n \n-\tif (netdev->flags & IFF_UP) {\n-\t\trtnl_lock();\n+\trtnl_lock();\n+\tif (!err && netif_running(netdev))\n \t\terr = __igb_open(netdev, true);\n-\t\trtnl_unlock();\n-\t\tif (err)\n-\t\t\treturn err;\n-\t}\n \n-\tnetif_device_attach(netdev);\n-\treturn 0;\n+\tif (!err)\n+\t\tnetif_device_attach(netdev);\n+\trtnl_unlock();\n+\n+\treturn err;\n }\n \n static int igb_runtime_idle(struct device *dev)\n",
    "prefixes": [
        "v2"
    ]
}