moby/volume/mounts
Paweł Gronowski 76b88fb5ff
volume: Don't decrement refcount below 0
With both rootless and live restore enabled, there's some race condition
which causes the container to be `Unmount`ed before the refcount is
restored.

This makes sure we don't underflow the refcount (uint64) when
decrementing it.

The root cause of this race condition still needs to be investigated and
fixed, but at least this unflakies the `TestLiveRestore`.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 294fc9762e)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-08 12:52:35 +01:00
..
fuzz_test.go testing: move fuzzers over from OSS-Fuzz 2022-11-30 17:31:03 +01:00
lcow_parser.go gofmt GoDoc comments with go1.19 2022-07-08 19:56:23 +02:00
lcow_parser_test.go volume/mounts: use sub-tests, and use gotest.tools 2021-07-02 14:11:57 +02:00
linux_parser.go volume: use strings.Cut() and minor refactor 2022-12-21 11:09:00 +01:00
linux_parser_test.go volume/mounts: use sub-tests, and use gotest.tools 2021-07-02 14:11:57 +02:00
mounts.go volume: Don't decrement refcount below 0 2024-03-08 12:52:35 +01:00
parser.go volume/mounts: add constructors for each parser 2021-07-02 14:11:50 +02:00
parser_test.go volume: fix empty-lines (revive) 2022-09-28 01:58:50 +02:00
validate.go Tweak bind mount errors 2018-09-28 12:18:58 +02:00
validate_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
validate_unix_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
validate_windows_test.go Move mount parsing to separate package. 2018-04-19 06:35:54 -04:00
volume_copy.go Move mount parsing to separate package. 2018-04-19 06:35:54 -04:00
volume_unix.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
volume_windows.go volume/mounts: move some code to correct location, and minor linting/formatting 2021-07-02 13:25:27 +02:00
windows_parser.go volume: use strings.Cut() and minor refactor 2022-12-21 11:09:00 +01:00
windows_parser_test.go Fix windows rxReservedNames 2021-11-08 13:14:11 -05:00