From 84264e9461e11ee2884830df0768eaea662c5cc9 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Thu, 10 Nov 2016 22:02:14 -0800 Subject: [PATCH] fix ARM unsafe access Signed-off-by: Victor Vieux --- vendor.conf | 2 +- .../docker/libnetwork/networkdb/networkdb.go | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/vendor.conf b/vendor.conf index 978e3f4ce1..e57b3e6889 100644 --- a/vendor.conf +++ b/vendor.conf @@ -23,7 +23,7 @@ github.com/RackSec/srslog 365bf33cd9acc21ae1c355209865f17228ca534e github.com/imdario/mergo 0.2.1 #get libnetwork packages -github.com/docker/libnetwork 1861587d0fe7cdf85b89160ed36f20b81e96528d +github.com/docker/libnetwork 57be722e077059d1ee0539be31743a3642ccbeb3 github.com/docker/go-events 18b43f1bc85d9cdd42c05a6cd2d444c7a200a894 github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80 github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec diff --git a/vendor/github.com/docker/libnetwork/networkdb/networkdb.go b/vendor/github.com/docker/libnetwork/networkdb/networkdb.go index 2518030e30..087398e3cf 100644 --- a/vendor/github.com/docker/libnetwork/networkdb/networkdb.go +++ b/vendor/github.com/docker/libnetwork/networkdb/networkdb.go @@ -24,6 +24,15 @@ const ( // NetworkDB instance drives the networkdb cluster and acts the broker // for cluster-scoped and network-scoped gossip and watches. type NetworkDB struct { + // The clocks MUST be the first things + // in this struct due to Golang issue #599. + + // Global lamport clock for node network attach events. + networkClock serf.LamportClock + + // Global lamport clock for table events. + tableClock serf.LamportClock + sync.RWMutex // NetworkDB configuration. @@ -59,12 +68,6 @@ type NetworkDB struct { // waiting for an ack. bulkSyncAckTbl map[string]chan struct{} - // Global lamport clock for node network attach events. - networkClock serf.LamportClock - - // Global lamport clock for table events. - tableClock serf.LamportClock - // Broadcast queue for network event gossip. networkBroadcasts *memberlist.TransmitLimitedQueue