diff options
author | Sairam Venugopal <vsairam@vmware.com> | 2019-02-26 16:45:10 -0800 |
---|---|---|
committer | Alin Gabriel Serdean <aserdean@ovn.org> | 2019-03-13 13:18:26 +0200 |
commit | 132733d4b064191e917ea98ca4bf165f8cca2071 (patch) | |
tree | 88627780392687d507b5f178a2a2133138893b30 /datapath-windows | |
parent | 9c60fd48790afac901696c07b2befef3d2ea6301 (diff) | |
download | openvswitch-132733d4b064191e917ea98ca4bf165f8cca2071.tar.gz |
datapath-windows: Fix potential deadlock in event subscription
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 <vsairam@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@ovn.org>
Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Diffstat (limited to 'datapath-windows')
-rw-r--r-- | datapath-windows/ovsext/Event.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/datapath-windows/ovsext/Event.c b/datapath-windows/ovsext/Event.c index 348f03222..69cdb431b 100644 --- a/datapath-windows/ovsext/Event.c +++ b/datapath-windows/ovsext/Event.c @@ -245,9 +245,8 @@ OvsSubscribeEventIoctl(PFILE_OBJECT fileObject, return STATUS_INVALID_PARAMETER; } - OvsAcquireEventQueueLock(eventId); - instance = OvsGetOpenInstance(fileObject, request->dpNo); + OvsAcquireEventQueueLock(eventId); if (instance == NULL) { status = STATUS_INVALID_PARAMETER; |