Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752529AbdCBMmu (ORCPT ); Thu, 2 Mar 2017 07:42:50 -0500 Received: from mail-sn1nam01on0126.outbound.protection.outlook.com ([104.47.32.126]:31680 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750892AbdCBMms (ORCPT ); Thu, 2 Mar 2017 07:42:48 -0500 From: Dexuan Cui To: Vitaly Kuznetsov , "devel@linuxdriverproject.org" CC: "linux-kernel@vger.kernel.org" , "KY Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Alex Ng (LIS)" Subject: RE: [PATCH] Drivers: hv: util: move waiting for release to hv_utils_transport itself Thread-Topic: [PATCH] Drivers: hv: util: move waiting for release to hv_utils_transport itself Thread-Index: AQHSkzoQa95pMltxr0uV/qQExn424KGBUkyA Date: Thu, 2 Mar 2017 10:06:13 +0000 Message-ID: References: <20170302094749.3097-1-vkuznets@redhat.com> In-Reply-To: <20170302094749.3097-1-vkuznets@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [167.220.255.28] x-ms-office365-filtering-correlation-id: 11634485-229b-4c43-9b92-08d46153c293 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:MWHPR03MB2734; x-microsoft-exchange-diagnostics: 1;MWHPR03MB2734;7:+4wvF1V1u0bnh2KhHw1P/2kzF79JOTSy0uayFIOJ4hSF4p7JbFqFqVFtGlHt5alYAB/57rySNN8Kwj616IyF5V203c9h3/bkc8O0+dN07aLdKK6m4EwHs55qWohp6Z68PvXN1cMlfPp6bnZttVl3slzXc/k36JjfgdE+n9lf4IQ7cazEhTRrFxObstqRkELp0gMoj3fMmkyrdMSjyF54/bNLH6J9nz/KqjwdXdfw/Z3xXPWI1TKiU/7cbi1IFJKgDwgkiGUG83iXfrZwcOCYov0VVde2F31o0V/maFIuOm+/j2BICWr3fgyMNs+NbcLeRD+Pa8P2B4H58xkviUbNIPfn0fhEM0Gs4kw/PtiVxJo= x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041248)(20161123564025)(20161123560025)(20161123562025)(20161123558025)(20161123555025)(6072148);SRVR:MWHPR03MB2734;BCL:0;PCL:0;RULEID:;SRVR:MWHPR03MB2734; x-forefront-prvs: 023495660C x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(39450400003)(39860400002)(39410400002)(39850400002)(3280700002)(99286003)(189998001)(50986999)(54356999)(3660700001)(229853002)(55016002)(66066001)(76176999)(33656002)(2950100002)(25786008)(6436002)(6506006)(77096006)(2906002)(81166006)(8936002)(8990500004)(10090500001)(102836003)(3846002)(6116002)(2501003)(5005710100001)(8676002)(2900100001)(107886003)(38730400002)(10290500002)(106116001)(5660300001)(53936002)(6246003)(74316002)(4326008)(122556002)(7736002)(53546006)(92566002)(305945005)(86362001)(7696004)(9686003);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR03MB2734;H:MWHPR03MB2669.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: 02 Mar 2017 10:06:13.6852 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB2734 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 v22CgsHB020789 Content-Length: 1276 Lines: 27 > From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com] > Sent: Thursday, March 2, 2017 17:48 > To: devel@linuxdriverproject.org > Cc: linux-kernel@vger.kernel.org; KY Srinivasan ; Haiyang > Zhang ; Stephen Hemminger > ; Dexuan Cui ; Alex Ng (LIS) > > Subject: [PATCH] Drivers: hv: util: move waiting for release to hv_utils_transport > itself > > Waiting for release_event in all three drivers introduced issues on release > as on_reset() hook is not always called. E.g. if the device was never > opened we will never get the completion. > > Move the waiting code to hvutil_transport_destroy() and make sure it is > only called when the device is open. hvt->lock serialization should > guarantee the absence of races. > > Fixes: 5a66fecbf6aa ("Drivers: hv: util: kvp: Fix a rescind processing issue") > Fixes: 20951c7535b5 ("Drivers: hv: util: Fcopy: Fix a rescind processing issue") > Fixes: d77044d142e9 ("Drivers: hv: util: Backup: Fix a rescind processing issue") > Reported-by: Dexuan Cui > Tested-by: Dexuan Cui > Signed-off-by: Vitaly Kuznetsov Acked-by: Dexuan Cui