xennet_xenbus_detach() runs at splnet(), so this should be enough to preventOn Fri, Feb 05, 2016 at 01:09:28PM -0800, Rohan Desai wrote:
> I'm getting a panic due to a race between the detach path
> (xennet_xenbus_detach) and event handling (xennet_handler called from
> triggered event channel). xennet_xenbus_detach frees up the tx ring and
> xennet_handler tries to access it. I'm not sure what event the event
> channel is being poked for (tx complete, rx ready, other). Does anybody
> know how these two code-paths are supposed to be synchronized ?
the event handler from being called.
But I see where the race could be: we sleep waiting for the rx grant
ref to be released, the event handler could be called at this time.
I guess just removing the interrupt handler earlier, like in the
attached patch, is enough to fix it. Can you test ?
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--