Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754843AbbGPNmX (ORCPT ); Thu, 16 Jul 2015 09:42:23 -0400 Received: from mail-bn1bon0136.outbound.protection.outlook.com ([157.56.111.136]:20758 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754084AbbGPNmU convert rfc822-to-8bit (ORCPT ); Thu, 16 Jul 2015 09:42:20 -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 13:42:05 +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: [50.135.110.52] x-microsoft-exchange-diagnostics: 1;BY2PR0301MB0776;5:ymz9/n+rbfd/quTyHGEqZTPzZVGZz8XXh0HKBaSDaaMdrbjTvUR+vNIeh5pLJAerKaYM7g4SGOSxUa4GxqwnMSB42i1njLcs84W5MBsDTTdGYr3kPWVvpZqhaxzeFc0YkCgqsIAla1Fr46sKV37u7w==;24:PA5kGD97IJWp7c0jNGC/1mf+tVHDsDg03gvkFUEF3WET0b/I2bZDKwO/nFxtqBUahoy2F1z+HrOEDmev2giCeX57luT+3WOHvYIaGDrp4HI=;20:yX1i86eUp7SgektSVfQmNhR5DzdS+uaANWtGKjQyHFPb5wYNm45x7WTfjkwaQAL1PQMgIAYQ6JUexX1s++GNNg== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0776; 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:BY2PR0301MB0776;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0776; x-forefront-prvs: 0639027A9E x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(13464003)(76576001)(2561002)(99286002)(5001960100002)(5001770100001)(92566002)(1511001)(40100003)(122556002)(77156002)(2421001)(62966003)(5003600100002)(106116001)(46102003)(2950100001)(77096005)(2900100001)(102836002)(50986999)(76176999)(54356999)(5002640100001)(66066001)(74316001)(87936001)(2656002)(86362001)(189998001)(33656002)(86612001)(19580395003)(19580405001)(4001450100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0301MB0776;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 13:42:05.1322 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB0776 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/