moby/volume
Brian Goff eefb2220c0 Fix usage of boltdb in volume restore
bolt k/v pairs are only valid for the life of a transaction.
This means the memory that the k/v pair is referencing may be invalid if
it is accessed outside of the transaction.
This can potentially cause a panic.

For reference: https://godoc.org/github.com/boltdb/bolt#hdr-Caveats

To fix this issue, unmarshal the stored data into volume meta before
closing the transaction.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 4876a9047e)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:41 +01:00
..
drivers Implement content addressability for plugins 2016-12-27 13:31:14 -08:00
local Restrict checkpoint name to prevent directory traversal 2016-11-28 11:17:55 -08:00
store Fix usage of boltdb in volume restore 2017-01-04 12:42:41 +01:00
testutils test: fix trivial code convention noncompliance 2016-09-12 07:36:52 +00:00
validate.go api: fix ReadOnly support for tmpfs 2016-11-08 06:49:17 +00:00
validate_test.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
validate_test_unix.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
validate_test_windows.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
volume.go Fix uneccessary calls to volume.Unmount() 2016-11-10 14:04:08 -05:00
volume_copy.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
volume_copy_unix.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
volume_copy_windows.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
volume_linux.go Use container Mounts API for Swarm containers. 2016-11-22 16:13:28 -08:00
volume_linux_test.go api: fix ReadOnly support for tmpfs 2016-11-08 06:49:17 +00:00
volume_propagation_linux.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
volume_propagation_linux_test.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
volume_propagation_unsupported.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
volume_test.go Fix several issues with go vet and go fmt 2016-11-18 15:14:49 -08:00
volume_unix.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
volume_unsupported.go api: fix ReadOnly support for tmpfs 2016-11-08 06:49:17 +00:00
volume_windows.go Windows: Remove TP5 support from volume 2016-09-21 11:03:19 -07:00