1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/libnetwork/drivers/overlay
Chris Telfer f0c86fb56e Fix deadlock introduced in b64997ea
Commit b64997ea prevented data corruption due to simultaneous
driver.CreateNetwork()/driver.DeleteNetwork() by holding the network
lock through the read/modify part of the operation.  However, part of
the DeleteNetwork operation entails sending a message to the peerDB to
tell that goroutine to flush entries on deletion.  This can lead to a
deadlock where:
  * driver.DeleteNetwork() starts and acquires driver.Lock()
  * peerDB receives some other request (e.g. EventNotify) and blocks
    on driver.Lock()
  * driver.DeleteNetwork() attempts a peerDB flush and blocks waiting
    on the synchronous peerDB operation channel

This patch fixes the issue by deferring the peerDB flush operation until
after DeleteNetwork() unlocks driver.Lock().   Commit b64997ea only
modified CreateNetwork() and DeleteNetwork() and the critical section
that driver.Lock() protects in CreateNetwork() does not perform any
peerDB notifications or other locks of driver data structures.  So this
solution should be a complete fix for any regressions introduced in
b64997ea.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
2018-06-08 14:17:51 -04:00
..
ovmanager Remove race condition from ovnmanager 2018-05-01 17:41:42 -04:00
encryption.go Remove race in encrypted overlay key update 2018-05-01 17:41:47 -04:00
filter.go Update logrus to v1.0.1 2017-08-07 11:20:47 -07:00
joinleave.go Addressing code review comments 2017-10-02 11:12:36 -07:00
ostweaks_linux.go Allow for larger preset property values, do not override 2018-04-11 13:09:02 -05:00
ostweaks_unsupported.go Set kernel specific config on linux 2017-06-02 21:00:56 -07:00
ov_endpoint.go Fix lint issues 2017-09-20 08:57:02 -07:00
ov_network.go Fix deadlock introduced in b64997ea 2018-06-08 14:17:51 -04:00
ov_serf.go Handle IP reuse in overlay 2017-10-02 11:12:33 -07:00
ov_utils.go Update logrus to v1.0.1 2017-08-07 11:20:47 -07:00
overlay.go Handle IP reuse in overlay 2017-10-02 11:12:33 -07:00
overlay.pb.go Convert overlay peer updates to use protobuf 2016-05-18 20:44:50 -07:00
overlay.proto Handle IP reuse in overlay 2017-10-02 11:12:33 -07:00
overlay_test.go Fix watchMiss thread context 2018-01-10 13:50:49 -08:00
peerdb.go Fix IPMask marshalling 2017-10-03 19:38:54 -07:00
peerdb_test.go Fix IPMask marshalling 2017-10-03 19:38:54 -07:00