[{"id":1766563,"web_url":"http://patchwork.ozlabs.org/comment/1766563/","msgid":"<20170911.142149.387728437634566641.davem@davemloft.net>","list_archive_url":null,"date":"2017-09-11T21:21:49","subject":"Re: [PATCH v2 net-next 1/2] hv_netvsc: fix deadlock on hotplug","submitter":{"id":15,"url":"http://patchwork.ozlabs.org/api/people/15/","name":"David Miller","email":"davem@davemloft.net"},"content":"From: Stephen Hemminger <stephen@networkplumber.org>\nDate: Wed,  6 Sep 2017 13:53:05 -0700\n\n> When a virtual device is added dynamically (via host console), then\n> the vmbus sends an offer message for the primary channel. The processing\n> of this message for networking causes the network device to then\n> initialize the sub channels.\n> \n> The problem is that setting up the sub channels needs to wait until\n> the subsequent subchannel offers have been processed. These offers\n> come in on the same ring buffer and work queue as where the primary\n> offer is being processed; leading to a deadlock.\n> \n> This did not happen in older kernels, because the sub channel waiting\n> logic was broken (it wasn't really waiting).\n> \n> The solution is to do the sub channel setup in its own work queue\n> context that is scheduled by the primary channel setup; and then\n> happens later.\n> \n> Fixes: 732e49850c5e (\"netvsc: fix race on sub channel creation\")\n> Reported-by: Dexuan Cui <decui@microsoft.com>\n> Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>\n> ---\n> v2 - fix module removal race with new work queue\n\nApplied.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrgq80WWkz9s7M\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 12 Sep 2017 07:21:56 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751148AbdIKVVx (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 11 Sep 2017 17:21:53 -0400","from shards.monkeyblade.net ([184.105.139.130]:56086 \"EHLO\n\tshards.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750993AbdIKVVw (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 11 Sep 2017 17:21:52 -0400","from localhost (74-93-104-98-Washington.hfc.comcastbusiness.net\n\t[74.93.104.98]) (using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(Client did not present a certificate)\n\t(Authenticated sender: davem-davemloft)\n\tby shards.monkeyblade.net (Postfix) with ESMTPSA id 4AAC410229942;\n\tMon, 11 Sep 2017 14:21:52 -0700 (PDT)"],"Date":"Mon, 11 Sep 2017 14:21:49 -0700 (PDT)","Message-Id":"<20170911.142149.387728437634566641.davem@davemloft.net>","To":"stephen@networkplumber.org","Cc":"kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com,\n\tdevel@linuxdriverproject.org, netdev@vger.kernel.org","Subject":"Re: [PATCH v2 net-next 1/2] hv_netvsc: fix deadlock on hotplug","From":"David Miller <davem@davemloft.net>","In-Reply-To":"<20170906205306.10541-2-sthemmin@microsoft.com>","References":"<20170906205306.10541-1-sthemmin@microsoft.com>\n\t<20170906205306.10541-2-sthemmin@microsoft.com>","X-Mailer":"Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO)","Mime-Version":"1.0","Content-Type":"Text/Plain; charset=us-ascii","Content-Transfer-Encoding":"7bit","X-Greylist":"Sender succeeded SMTP AUTH, not delayed by\n\tmilter-greylist-4.5.12 (shards.monkeyblade.net\n\t[149.20.54.216]); Mon, 11 Sep 2017 14:21:52 -0700 (PDT)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}}]