Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754391AbbGPAdq (ORCPT ); Wed, 15 Jul 2015 20:33:46 -0400 Received: from mail-by2on0123.outbound.protection.outlook.com ([207.46.100.123]:28828 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753856AbbGPAdo convert rfc822-to-8bit (ORCPT ); Wed, 15 Jul 2015 20:33:44 -0400 From: KY Srinivasan To: Vitaly Kuznetsov , Dexuan Cui CC: "devel@linuxdriverproject.org" , "Haiyang Zhang" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] Drivers: hv: vmbus: prevent new subchannel creation on device shutdown Thread-Topic: [PATCH] Drivers: hv: vmbus: prevent new subchannel creation on device shutdown Thread-Index: AQHQvk6KDQ3nQCJkBU2Sq3NyVNZ99J3dMbQg Date: Thu, 16 Jul 2015 00:31:06 +0000 Message-ID: References: <1436789934-11566-1-git-send-email-vkuznets@redhat.com> <19f503e369b04d01b79a1bde866a39f8@SIXPR30MB031.064d.mgd.msft.net> <87lheiybf5.fsf@vitty.brq.redhat.com> In-Reply-To: <87lheiybf5.fsf@vitty.brq.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; x-originating-ip: [2001:4898:80e8:ee31::4] x-microsoft-exchange-diagnostics: 1;BY2PR0301MB0775;5:AgETVrdoII3+z9CQKwzNLPQ+NCzTzG1HimhfRUinEnbM7QWx0Z/DvmVDmSCYgVqhagWcwHTqHDdRvDz0+x+V1/iXKm17xPUe1Wzf3WwK8NRJIh/BQsCDI0AJSqWs7bZkKqFsjpi6NMPqcp137ocuZw==;24:w8U1tnE1lF2UAuU7vUpzVPaaYd6ZpJhbptJ/WPWB9pxw7e47EGGdwRVsJsyIUXNzQzoSs+eUR1NgJNbl6eg9C0aT+gE7E5CTKW66PiOS9fg=;20:z4snCF1NtOggyzr+rg0YqhM9B/Yt8ZGpscGz3D5M4kes8ZvlHL+qZOavMKq2gHYKXCoIbUvwV2Q+wmxnZJSZdg== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0775; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(108003899814671); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401001)(5005006)(3002001);SRVR:BY2PR0301MB0775;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0775; x-forefront-prvs: 0639027A9E x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(13464003)(5002640100001)(2900100001)(77156002)(62966003)(1511001)(99286002)(5003600100002)(2950100001)(2421001)(33656002)(102836002)(77096005)(122556002)(2561002)(5001770100001)(92566002)(87936001)(54356999)(19580405001)(19580395003)(46102003)(5001960100002)(74316001)(86362001)(40100003)(76176999)(2656002)(50986999)(106116001)(189998001)(76576001)(3826002)(4001450100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0301MB0775;H:BY2PR0301MB1654.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jul 2015 00:31:06.5380 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB0775 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1793 Lines: 50 > -----Original Message----- > From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com] > Sent: Tuesday, July 14, 2015 9:03 AM > To: Dexuan Cui > Cc: devel@linuxdriverproject.org; KY Srinivasan; Haiyang Zhang; linux- > kernel@vger.kernel.org > Subject: Re: [PATCH] Drivers: hv: vmbus: prevent new subchannel creation > on device shutdown > > Dexuan Cui writes: > > >> -----Original Message----- > >> From: Vitaly Kuznetsov > >> Sent: Monday, July 13, 2015 20:19 > >> Subject: [PATCH] Drivers: hv: vmbus: prevent new subchannel creation on > device > >> shutdown > >> > >> When a new subchannel offer from host comes during device shutdown > (e.g. > >> when a netvsc/storvsc module is unloadedshortly after it was loaded) a > >> crash can happen as vmbus_process_offer() is not anyhow serialized with > >> vmbus_remove(). > > > > How about vmbus_onoffer_rescind()? > > It's not serialized with vmbus_remove() either, so I think there is an issue > too? > > > > I remember when 'rmmod hv_netvsc', we get a rescind-offer message for > > each subchannel. > > > > True, I think we have a race with rescind messages as well, we just > never saw crashes for some reason. I'll think how we can make the fix > more general. In an earlier email I had outlined how I was planning to address original issue. I have a patch based on the logic I had described - essentially put the burden on the probe call to ensure that the open (including sub-channels) is complete before we return from probe. I will post this shortly. Regards, K. Y -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/