Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751787AbdCAOth (ORCPT ); Wed, 1 Mar 2017 09:49:37 -0500 Received: from mail-sn1nam02on0134.outbound.protection.outlook.com ([104.47.36.134]:2087 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751583AbdCAOtf (ORCPT ); Wed, 1 Mar 2017 09:49:35 -0500 From: Dexuan Cui To: KY Srinivasan , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "olaf@aepfle.de" , "apw@canonical.com" , "vkuznets@redhat.com" , "jasowang@redhat.com" , "leann.ogasawara@canonical.com" CC: Haiyang Zhang , Stephen Hemminger Subject: RE: [PATCH 1/1] Drivers: hv: util: on deinit, don't wait the release event, if we shouldn't Thread-Topic: [PATCH 1/1] Drivers: hv: util: on deinit, don't wait the release event, if we shouldn't Thread-Index: AQHSkU/kJuR7/+sJ10uJiLyUeQ36BKGACIkw Date: Wed, 1 Mar 2017 14:31:36 +0000 Message-ID: References: <1488237482-23910-1-git-send-email-kys@exchange.microsoft.com> In-Reply-To: <1488237482-23910-1-git-send-email-kys@exchange.microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: microsoft.com; dkim=none (message not signed) header.d=none;microsoft.com; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [2404:f801:9000:19::402] x-ms-office365-filtering-correlation-id: c3e8c310-df2e-4a46-f3bc-08d460afab09 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:CY4PR03MB2488; x-microsoft-exchange-diagnostics: 1;CY4PR03MB2488;7:Vqq8968/xh/idGrHdjWIu3hzZRU11Jlz7pub47vkYt2axjY7K1m9+jarplkVd3RDmdHgWPlqv5+WTM57qp1CAh80zNdiYIGdnG6sTZVg+3fRCBLoATx7GXg8gf7poAjO+iZkNHaGWEz1pjmDgPsxBfKyqB0mx5KqCN3kTCRuq55fDKlHy5VmRM3b0tO30Q0/XyboifnnwYO4SCRWrPOBJT8KJ10+3GQ6CatUfwQE68jFIGy4XJ6+u2IefrKuW962k7rRa1B2UGoiFVfkNgGbWRQvAsZk9FIlqWcIS0QawGvga6gO0Pi9+RYJW4A8xf5mggw4IP3DhHJI0NweME4juDuWcAHC5MPtFsqQw+czWIM= x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(140211028294663); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041248)(20161123558025)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148)(6042181);SRVR:CY4PR03MB2488;BCL:0;PCL:0;RULEID:;SRVR:CY4PR03MB2488; x-forefront-prvs: 0233768B38 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(7736002)(8936002)(2950100002)(99286003)(55016002)(54906002)(2900100001)(3660700001)(106116001)(229853002)(6436002)(25786008)(33656002)(92566002)(77096006)(6506006)(10090500001)(8990500004)(10290500002)(5005710100001)(189998001)(2561002)(122556002)(6116002)(1511001)(3280700002)(102836003)(305945005)(7696004)(2906002)(74316002)(5660300001)(76176999)(54356999)(9686003)(53936002)(2501003)(8676002)(53546006)(6246003)(38730400002)(107886003)(4326008)(86362001)(50986999)(2201001)(81166006);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR03MB2488;H:CY4PR03MB2662.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2017 14:31:36.9610 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2488 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v21EngIT001869 Content-Length: 971 Lines: 27 > From: kys@exchange.microsoft.com [mailto:kys@exchange.microsoft.com] > Sent: Tuesday, February 28, 2017 07:18 > To: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; > ... > From: Dexuan Cui > > If the daemon is NOT running at all, when we disable the util device from > Hyper-V Manager (or sometimes the host can rescind a util device and then > re-offer it), we'll hang in util_remove -> hv_kvp_deinit -> > wait_for_completion(&release_event), because this code path doesn't run: > hvt_op_release -> ... -> kvp_on_reset -> complete(&release_event). > > Due to this, we even can't reboot the VM properly. > > The patch tracks if the dev file is opened or not, and we only need to > wait if it's opened. > > Fixes: 5a66fecbf6aa ("Drivers: hv: util: kvp: Fix a rescind processing issue") > > Signed-off-by: Dexuan Cui > ... Please ignore this patch, since Vitaly posted a better fix instead. Thanks, -- Dexuan