get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1060204,
    "url": "http://patchwork.ozlabs.org/api/patches/1060204/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190321144223.14392-1-yuehaibing@huawei.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": "<20190321144223.14392-1-yuehaibing@huawei.com>",
    "list_archive_url": null,
    "date": "2019-03-21T14:42:23",
    "name": "fm10k: Fix a potential NULL pointer dereference",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "0a9939d6bcc73562edb27097f6c41d272998e3cb",
    "submitter": {
        "id": 70610,
        "url": "http://patchwork.ozlabs.org/api/people/70610/?format=api",
        "name": "Yue Haibing",
        "email": "yuehaibing@huawei.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/20190321144223.14392-1-yuehaibing@huawei.com/mbox/",
    "series": [
        {
            "id": 98465,
            "url": "http://patchwork.ozlabs.org/api/series/98465/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=98465",
            "date": "2019-03-21T14:42:23",
            "name": "fm10k: Fix a potential NULL pointer dereference",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/98465/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1060204/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1060204/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=none (p=none dis=none) header.from=huawei.com"
        ],
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 44Q8f433zYz9sRG\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Mar 2019 01:42:49 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id AA9F087D6C;\n\tThu, 21 Mar 2019 14:42:46 +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 xZzofZODXlHx; Thu, 21 Mar 2019 14:42:44 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 9D30087D6A;\n\tThu, 21 Mar 2019 14:42:44 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 7C11A1BF477\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 21 Mar 2019 14:42:43 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 7850D85FA4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 21 Mar 2019 14:42:43 +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 oArsFXOKSDJb for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 21 Mar 2019 14:42:42 +0000 (UTC)",
            "from huawei.com (szxga07-in.huawei.com [45.249.212.35])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 9E84285FA2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 21 Mar 2019 14:42:42 +0000 (UTC)",
            "from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58])\n\tby Forcepoint Email with ESMTP id 25003E05C793F8766B05;\n\tThu, 21 Mar 2019 22:42:36 +0800 (CST)",
            "from localhost (10.177.31.96) by DGGEMS414-HUB.china.huawei.com\n\t(10.3.19.214) with Microsoft SMTP Server id 14.3.408.0;\n\tThu, 21 Mar 2019 22:42:26 +0800"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "From": "Yue Haibing <yuehaibing@huawei.com>",
        "To": "<davem@davemloft.net>, <jeffrey.t.kirsher@intel.com>",
        "Date": "Thu, 21 Mar 2019 22:42:23 +0800",
        "Message-ID": "<20190321144223.14392-1-yuehaibing@huawei.com>",
        "X-Mailer": "git-send-email 2.10.2.windows.1",
        "MIME-Version": "1.0",
        "X-Originating-IP": "[10.177.31.96]",
        "X-CFilter-Loop": "Reflected",
        "Subject": "[Intel-wired-lan] [PATCH] fm10k: Fix a potential NULL pointer\n\tdereference",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "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, YueHaibing <yuehaibing@huawei.com>,\n\tintel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org",
        "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": "From: YueHaibing <yuehaibing@huawei.com>\n\nSyzkaller report this:\n\nkasan: GPF could be caused by NULL-ptr deref or user memory access\ngeneral protection fault: 0000 [#1] SMP KASAN PTI\nCPU: 0 PID: 4378 Comm: syz-executor.0 Tainted: G         C        5.0.0+ #5\nHardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014\nRIP: 0010:__lock_acquire+0x95b/0x3200 kernel/locking/lockdep.c:3573\nCode: 00 0f 85 28 1e 00 00 48 81 c4 08 01 00 00 5b 5d 41 5c 41 5d 41 5e 41 5f c3 4c 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 cc 24 00 00 49 81 7d 00 e0 de 03 a6 41 bc 00 00\nRSP: 0018:ffff8881e3c07a40 EFLAGS: 00010002\nRAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000\nRDX: 0000000000000010 RSI: 0000000000000000 RDI: 0000000000000080\nRBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000\nR10: ffff8881e3c07d98 R11: ffff8881c7f21f80 R12: 0000000000000001\nR13: 0000000000000080 R14: 0000000000000000 R15: 0000000000000001\nFS:  00007fce2252e700(0000) GS:ffff8881f2400000(0000) knlGS:0000000000000000\nCS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\nCR2: 00007fffc7eb0228 CR3: 00000001e5bea002 CR4: 00000000007606f0\nDR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\nDR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\nPKRU: 55555554\nCall Trace:\n lock_acquire+0xff/0x2c0 kernel/locking/lockdep.c:4211\n __mutex_lock_common kernel/locking/mutex.c:925 [inline]\n __mutex_lock+0xdf/0x1050 kernel/locking/mutex.c:1072\n drain_workqueue+0x24/0x3f0 kernel/workqueue.c:2934\n destroy_workqueue+0x23/0x630 kernel/workqueue.c:4319\n __do_sys_delete_module kernel/module.c:1018 [inline]\n __se_sys_delete_module kernel/module.c:961 [inline]\n __x64_sys_delete_module+0x30c/0x480 kernel/module.c:961\n do_syscall_64+0x9f/0x450 arch/x86/entry/common.c:290\n entry_SYSCALL_64_after_hwframe+0x49/0xbe\nRIP: 0033:0x462e99\nCode: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48\nRSP: 002b:00007fce2252dc58 EFLAGS: 00000246 ORIG_RAX: 00000000000000b0\nRAX: ffffffffffffffda RBX: 000000000073bf00 RCX: 0000000000462e99\nRDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000140\nRBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000\nR10: 0000000000000000 R11: 0000000000000246 R12: 00007fce2252e6bc\nR13: 00000000004bcca9 R14: 00000000006f6b48 R15: 00000000ffffffff\n\nIf alloc_workqueue fails, it should return -ENOMEM, otherwise may\ntrigger this NULL pointer dereference while unloading drivers.\n\nReported-by: Hulk Robot <hulkci@huawei.com>\nFixes: 0a38c17a21a0 (\"fm10k: Remove create_workqueue\")\nSigned-off-by: YueHaibing <yuehaibing@huawei.com>\n---\n drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 ++\n 1 file changed, 2 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c\nindex 5a04194..ecef949 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c\n@@ -41,6 +41,8 @@ static int __init fm10k_init_module(void)\n \t/* create driver workqueue */\n \tfm10k_workqueue = alloc_workqueue(\"%s\", WQ_MEM_RECLAIM, 0,\n \t\t\t\t\t  fm10k_driver_name);\n+\tif (!fm10k_workqueue)\n+\t\treturn -ENOMEM;\n \n \tfm10k_dbg_init();\n \n",
    "prefixes": []
}