> > Move the EventQueue lock acquisition after the dispatchLock to prevent a > potential deadlock in port creation pipeline. There could be a case where a > port event could try to take up the Dispatch Lock before the Event Queue > lock and the subscription queue event could take up the event queue lock > before the dispatch lock. > > Found while testing with Driver Verifier enabled. > > Signed-off-by: Sairam Venugopal <vsai...@vmware.com> > --- > datapath-windows/ovsext/Event.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > [Alin Serdean] Thanks for fixing this. I'm attaching the call stack dump just for reference: ================================================= Thread 0: TERMINATED took locks in the following order:
Lock A = ffffd58387490fa0 (+0xffffd58387490fa0) - Type 'Spinlock'. Stack: fffff80046e75f39 NDIS!NdisAcquireRWLockWrite+0x0000000000000039 fffff80046eeeb8a NDIS!ndisVerifyNdisAcquireRWLockWrite+0x000000000000006a fffff800488cd513 OVSExt!HvDeletePort+0x0000000000000063 [c:\\ovs\datapath-windows\ovsext\vport.c @ 305] fffff800488c6294 OVSExt!OvsProcessSetOid+0x00000000000001f0 [c:\\ovs\datapath-windows\ovsext\oid.c @ 267] fffff800488c5808 OVSExt!OvsExtOidRequest+0x00000000000000c8 [c:\\ovs\datapath-windows\ovsext\oid.c @ 397] fffff80046e7c86d NDIS!ndisFDoOidRequestInternal+0x000000000000028d fffff80238704118 nt!KeExpandKernelStackAndCalloutInternal+0x0000000000000078 fffff8023870408d nt!KeExpandKernelStackAndCalloutEx+0x000000000000001d Lock B = fffff800488da4c0 (OVSExt!eventQueueLockArr+0x0000000000000000) - Type 'Spinlock'. Stack: fffff800488b9ea3 OVSExt!OvsPostVportEvent+0x0000000000000073 [c:\\ovs\datapath-windows\ovsext\event.c @ 166] fffff800488cd5ce OVSExt!HvDeletePort+0x000000000000011e [c:\\ovs\datapath-windows\ovsext\vport.c @ 323] fffff800488c6294 OVSExt!OvsProcessSetOid+0x00000000000001f0 [c:\\ovs\datapath-windows\ovsext\oid.c @ 267] fffff800488c5808 OVSExt!OvsExtOidRequest+0x00000000000000c8 [c:\\ovs\datapath-windows\ovsext\oid.c @ 397] fffff80046e7c86d NDIS!ndisFDoOidRequestInternal+0x000000000000028d fffff80238704118 nt!KeExpandKernelStackAndCalloutInternal+0x0000000000000078 fffff8023870408d nt!KeExpandKernelStackAndCalloutEx+0x000000000000001d fffff80046e7bba1 NDIS!ndisQueueOidRequest+0x0000000000000311 ================================================= Thread 1: ffffd5838bca1080 took locks in the following order: Lock B = fffff800488da4c0 (OVSExt!eventQueueLockArr+0x0000000000000000) - Type 'Spinlock'. Stack: fffff800488ba400 OVSExt!OvsSubscribeEventIoctl+0x00000000000000d8 [c:\\ovs\datapath-windows\ovsext\event.c @ 248] fffff800488c3ed0 OVSExt!OvsSubscribeEventCmdHandler+0x0000000000000104 [c:\\ovs\datapath-windows\ovsext\datapath.c @ 1329] fffff800488c44f2 OVSExt!InvokeNetlinkCmdHandler+0x00000000000000a2 [c:\\ovs\datapath-windows\ovsext\datapath.c @ 1100] fffff800488de334 OVSExt!OvsDeviceControl+0x0000000000000308 [c:\\ovs\datapath-windows\ovsext\datapath.c @ 966] fffff80046f23451 NDIS!ndisDummyIrpHandler+0x0000000000000091 fffff80046a6c38d VerifierExt!xdv_IRP_MJ_DEVICE_CONTROL_wrapper+0x000000000000009d fffff80238f63a14 nt!ViGenericDispatchHandler+0x0000000000000040 fffff80238f63996 nt!ViGenericDeviceControl+0x0000000000000016 Lock A = ffffd58387490fa0 (+0xffffd58387490fa0) - Type 'Spinlock'. Stack: << Current stack trace - use kb to display it >> Same as on the other patch please try to respin the patch because the author seems wrong. Acked-by: Alin Gabriel Serdean <aserd...@ovn.org> _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev