Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1150875/?format=api
{ "id": 1150875, "url": "http://patchwork.ozlabs.org/api/patches/1150875/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190821140929.26985-1-sassmann@kpanic.de/", "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": "<20190821140929.26985-1-sassmann@kpanic.de>", "list_archive_url": null, "date": "2019-08-21T14:09:29", "name": "i40e: check __I40E_VF_DISABLE bit in i40e_sync_filters_subtask", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "0c0e62a6cc438c24cd55ba908e322020f4d75a2f", "submitter": { "id": 7508, "url": "http://patchwork.ozlabs.org/api/people/7508/?format=api", "name": "Stefan Assmann", "email": "sassmann@kpanic.de" }, "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/20190821140929.26985-1-sassmann@kpanic.de/mbox/", "series": [ { "id": 126509, "url": "http://patchwork.ozlabs.org/api/series/126509/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=126509", "date": "2019-08-21T14:09:29", "name": "i40e: check __I40E_VF_DISABLE bit in i40e_sync_filters_subtask", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/126509/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1150875/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1150875/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.137; helo=fraxinus.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=kpanic.de" ], "Received": [ "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\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 46D8tN1ht8z9sBF\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 22 Aug 2019 00:19:21 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 601D086DDB;\n\tWed, 21 Aug 2019 14:19:19 +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 h1ARwPz11H6j; Wed, 21 Aug 2019 14:19:18 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id B4DFC86449;\n\tWed, 21 Aug 2019 14:19:18 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 327321BF2FA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 21 Aug 2019 14:19:18 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 2D6D48543A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 21 Aug 2019 14:19:18 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id vTPOd2---KiE for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 21 Aug 2019 14:19:17 +0000 (UTC)", "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 8595E84F75\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 21 Aug 2019 14:19:17 +0000 (UTC)", "from smtp.corp.redhat.com\n\t(int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 4622E3083391;\n\tWed, 21 Aug 2019 14:09:48 +0000 (UTC)", "from p50.redhat.com (ovpn-117-124.ams2.redhat.com [10.36.117.124])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id C83F810013A1;\n\tWed, 21 Aug 2019 14:09:46 +0000 (UTC)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": [ "delayed 00:09:28 by SQLgrey-1.7.6", "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.44]); Wed, 21 Aug 2019 14:09:48 +0000 (UTC)" ], "From": "Stefan Assmann <sassmann@kpanic.de>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Wed, 21 Aug 2019 16:09:29 +0200", "Message-Id": "<20190821140929.26985-1-sassmann@kpanic.de>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.84 on 10.5.11.22", "Subject": "[Intel-wired-lan] [PATCH] i40e: check __I40E_VF_DISABLE bit in\n\ti40e_sync_filters_subtask", "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, davem@davemloft.net, sassmann@kpanic.de", "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": "While testing VF spawn/destroy the following panic occured.\n\nBUG: unable to handle kernel NULL pointer dereference at 0000000000000029\n[...]\nWorkqueue: i40e i40e_service_task [i40e]\nRIP: 0010:i40e_sync_vsi_filters+0x6fd/0xc60 [i40e]\n[...]\nCall Trace:\n ? __switch_to_asm+0x35/0x70\n ? __switch_to_asm+0x41/0x70\n ? __switch_to_asm+0x35/0x70\n ? _cond_resched+0x15/0x30\n i40e_sync_filters_subtask+0x56/0x70 [i40e]\n i40e_service_task+0x382/0x11b0 [i40e]\n ? __switch_to_asm+0x41/0x70\n ? __switch_to_asm+0x41/0x70\n process_one_work+0x1a7/0x3b0\n worker_thread+0x30/0x390\n ? create_worker+0x1a0/0x1a0\n kthread+0x112/0x130\n ? kthread_bind+0x30/0x30\n ret_from_fork+0x35/0x40\n\nInvestigation revealed a race where pf->vf[vsi->vf_id].trusted may get\naccessed by the watchdog via i40e_sync_filters_subtask() although\ni40e_free_vfs() already free'd pf->vf.\nTo avoid this the call to i40e_sync_vsi_filters() in\ni40e_sync_filters_subtask() needs to be guarded by __I40E_VF_DISABLE,\nwhich is also used by i40e_free_vfs().\n\nNote: put the __I40E_VF_DISABLE check after the\n__I40E_MACVLAN_SYNC_PENDING check as the latter is more likely to\ntrigger.\n\nSigned-off-by: Stefan Assmann <sassmann@kpanic.de>\n---\n drivers/net/ethernet/intel/i40e/i40e_main.c | 5 +++++\n 1 file changed, 5 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 6d456e579314..f25c7da59b2b 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -2587,6 +2587,10 @@ static void i40e_sync_filters_subtask(struct i40e_pf *pf)\n \t\treturn;\n \tif (!test_and_clear_bit(__I40E_MACVLAN_SYNC_PENDING, pf->state))\n \t\treturn;\n+\tif (test_and_set_bit(__I40E_VF_DISABLE, pf->state)) {\n+\t\tset_bit(__I40E_MACVLAN_SYNC_PENDING, pf->state);\n+\t\treturn;\n+\t}\n \n \tfor (v = 0; v < pf->num_alloc_vsi; v++) {\n \t\tif (pf->vsi[v] &&\n@@ -2601,6 +2605,7 @@ static void i40e_sync_filters_subtask(struct i40e_pf *pf)\n \t\t\t}\n \t\t}\n \t}\n+\tclear_bit(__I40E_VF_DISABLE, pf->state);\n }\n \n /**\n", "prefixes": [] }