[PATCH] Drivers: hv: vmbus: prevent new subchannel creation on device shutdown

KY Srinivasan kys at microsoft.com
Thu Jul 16 00:31:06 UTC 2015



> -----Original Message-----
> From: Vitaly Kuznetsov [mailto:vkuznets at redhat.com]
> Sent: Tuesday, July 14, 2015 9:03 AM
> To: Dexuan Cui
> Cc: devel at linuxdriverproject.org; KY Srinivasan; Haiyang Zhang; linux-
> kernel at vger.kernel.org
> Subject: Re: [PATCH] Drivers: hv: vmbus: prevent new subchannel creation
> on device shutdown
> 
> Dexuan Cui <decui at microsoft.com> 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


More information about the devel mailing list