Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1321973/?format=api
{ "id": 1321973, "url": "http://patchwork.ozlabs.org/api/patches/1321973/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200702223906.42B6C95C0494@us180.sjc.aristanetworks.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": "<20200702223906.42B6C95C0494@us180.sjc.aristanetworks.com>", "list_archive_url": null, "date": "2020-07-02T22:39:06", "name": "[v2] igb: reinit_locked() should be called with rtnl_lock", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "cc73d5fb115dd95724c14447c573bda16ce2abe9", "submitter": { "id": 66455, "url": "http://patchwork.ozlabs.org/api/people/66455/?format=api", "name": "Francesco Ruggeri", "email": "fruggeri@arista.com" }, "delegate": { "id": 109701, "url": "http://patchwork.ozlabs.org/api/users/109701/?format=api", "username": "anguy11", "first_name": "Anthony", "last_name": "Nguyen", "email": "anthony.l.nguyen@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200702223906.42B6C95C0494@us180.sjc.aristanetworks.com/mbox/", "series": [ { "id": 187308, "url": "http://patchwork.ozlabs.org/api/series/187308/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=187308", "date": "2020-07-02T22:39:06", "name": "[v2] igb: reinit_locked() should be called with rtnl_lock", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/187308/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1321973/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1321973/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 spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.136; helo=silver.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>)", "ozlabs.org;\n dmarc=fail (p=quarantine dis=none) header.from=arista.com", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=arista.com header.i=@arista.com header.a=rsa-sha256\n header.s=Arista-A header.b=rl1tlBZH;\n\tdkim-atps=neutral" ], "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 49yY1G4Vkkz9sRW\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 3 Jul 2020 08:39:13 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 48C7D2047A;\n\tThu, 2 Jul 2020 22:39:10 +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 FvWf4eIF60np; Thu, 2 Jul 2020 22:39:08 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 7C9F62048E;\n\tThu, 2 Jul 2020 22:39:08 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n by ash.osuosl.org (Postfix) with ESMTP id 811171BF2FE\n for <intel-wired-lan@lists.osuosl.org>; Thu, 2 Jul 2020 22:39:07 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by whitealder.osuosl.org (Postfix) with ESMTP id 7733487DBA\n for <intel-wired-lan@lists.osuosl.org>; Thu, 2 Jul 2020 22:39:07 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id BTwFY0AYgYAP for <intel-wired-lan@lists.osuosl.org>;\n Thu, 2 Jul 2020 22:39:06 +0000 (UTC)", "from smtp.aristanetworks.com (mx.aristanetworks.com\n [162.210.129.12])\n by whitealder.osuosl.org (Postfix) with ESMTPS id E328987622\n for <intel-wired-lan@lists.osuosl.org>; Thu, 2 Jul 2020 22:39:06 +0000 (UTC)", "from us180.sjc.aristanetworks.com (us180.sjc.aristanetworks.com\n [172.25.230.4])\n by smtp.aristanetworks.com (Postfix) with ESMTP id 6328640186E;\n Thu, 2 Jul 2020 15:39:06 -0700 (PDT)", "by us180.sjc.aristanetworks.com (Postfix, from userid 10189)\n id 42B6C95C0494; Thu, 2 Jul 2020 15:39:06 -0700 (PDT)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com;\n s=Arista-A; t=1593729546;\n bh=ZVKT4xgQY8MAj9CulrPs/cabyZqtX2jpxJZx1/Wsnmo=;\n h=Date:To:Subject:From:From;\n b=rl1tlBZHsyj+T4ch+Pt9WXVyWpeqkSHxK4M1AZj+fn+EK+dxJ4VIA916sX9lRBlBO\n Jv7CzsqJeG5U08MIY3ZbZoyyJY6tZt1Cu0qOwj8x6LtgDQxb8UUpJ3rNzBVjPBIOT1\n Zc6thvjTasuaEmXKSoGk6/jxsRXunWfCu61wYQzdXAEvSSOIsm2qgQGkjfyNyd3R5h\n Oo68nc18Vo4qtamsk7AzX/SwPvHQFOtsAYPnjX34/mfJJRNWadUo/oSmz/3AMeankf\n SNzTsIRfx8eYbPwpHjyaf49BnG1Dh+PwbEByI9NOZEAw36OgqOhSFF+qtIrHdWMp+e\n 40agvPS1SSqvA==", "Date": "Thu, 02 Jul 2020 15:39:06 -0700", "To": "linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n intel-wired-lan@lists.osuosl.org, kuba@kernel.org, davem@davemloft.net,\n jeffrey.t.kirsher@intel.com, fruggeri@arista.com", "User-Agent": "Heirloom mailx 12.5 7/5/10", "Message-Id": "<20200702223906.42B6C95C0494@us180.sjc.aristanetworks.com>", "From": "fruggeri@arista.com (Francesco Ruggeri)", "Subject": "[Intel-wired-lan] [PATCH v2] igb: reinit_locked() should be called\n with rtnl_lock", "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 <intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <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 <mailto:intel-wired-lan-request@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@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "We observed two panics involving races with igb_reset_task.\nThe first panic is caused by this race condition:\n\n\tkworker\t\t\treboot -f\n\n\tigb_reset_task\n\tigb_reinit_locked\n\tigb_down\n\tnapi_synchronize\n\t\t\t\t__igb_shutdown\n\t\t\t\tigb_clear_interrupt_scheme\n\t\t\t\tigb_free_q_vectors\n\t\t\t\tigb_free_q_vector\n\t\t\t\tadapter->q_vector[v_idx] = NULL;\n\tnapi_disable\n\tPanics trying to access\n\tadapter->q_vector[v_idx].napi_state\n\nThe second panic (a divide error) is caused by this race:\n\nkworker\t\treboot -f\ttx packet\n\nigb_reset_task\n\t\t__igb_shutdown\n\t\trtnl_lock()\n\t\t...\n\t\tigb_clear_interrupt_scheme\n\t\tigb_free_q_vectors\n\t\tadapter->num_tx_queues = 0\n\t\t...\n\t\trtnl_unlock()\nrtnl_lock()\nigb_reinit_locked\nigb_down\nigb_up\nnetif_tx_start_all_queues\n\t\t\t\tdev_hard_start_xmit\n\t\t\t\tigb_xmit_frame\n\t\t\t\tigb_tx_queue_mapping\n\t\t\t\tPanics on\n\t\t\t\tr_idx % adapter->num_tx_queues\n\nThis commit applies to igb_reset_task the same changes that\nwere applied to ixgbe in commit 2f90b8657ec9 (\"ixgbe: this patch\nadds support for DCB to the kernel and ixgbe driver\"),\ncommit 8f4c5c9fb87a (\"ixgbe: reinit_locked() should be called with\nrtnl_lock\") and commit 88adce4ea8f9 (\"ixgbe: fix possible race in\nreset subtask\").\n\nv2: add fix for second race condition above.\n\nSigned-off-by: Francesco Ruggeri <fruggeri@arista.com>\n\n---\n drivers/net/ethernet/intel/igb/igb_main.c | 9 +++++++++\n 1 file changed, 9 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex 8bb3db2cbd41..6e5861bfb0fa 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -6224,9 +6224,18 @@ static void igb_reset_task(struct work_struct *work)\n \tstruct igb_adapter *adapter;\n \tadapter = container_of(work, struct igb_adapter, reset_task);\n \n+\trtnl_lock();\n+\t/* If we're already down or resetting, just bail */\n+\tif (test_bit(__IGB_DOWN, &adapter->state) ||\n+\t test_bit(__IGB_RESETTING, &adapter->state)) {\n+\t\trtnl_unlock();\n+\t\treturn;\n+\t}\n+\n \tigb_dump(adapter);\n \tnetdev_err(adapter->netdev, \"Reset adapter\\n\");\n \tigb_reinit_locked(adapter);\n+\trtnl_unlock();\n }\n \n /**\n", "prefixes": [ "v2" ] }