Files
containerd/core/remotes/docker
Justin Chadwell a9152ebf89 copy: prevent potential deadlock if close before fully written
We also need an additional check to avoid setting both the error and
response which can create a race where they can arrive in the receiving
thread in either order.

If we hit an error, we don't need to send the response.

> There is a condition where the registry (unexpectedly, not to spec)
> returns 201 or 204 on the put before the body is fully written. I would
> expect that the http library would issue close and could fall into a
> deadlock here. We could just read respC and call setResponse. In that
> case ErrClosedPipe would get returned and Commit shouldn't be called
> anyway.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2024-02-03 10:20:11 +01:00
..
2024-01-25 22:18:45 -08:00
2024-01-25 22:18:45 -08:00
2024-01-17 09:52:21 -08:00
2024-01-17 09:52:21 -08:00
2024-01-17 09:52:21 -08:00
2024-01-17 09:52:21 -08:00
2024-01-17 09:52:21 -08:00
2024-01-17 09:52:21 -08:00
2024-01-25 22:18:45 -08:00
2024-01-17 09:55:58 -08:00
2024-01-25 22:18:45 -08:00
2024-01-17 09:52:21 -08:00
2024-01-17 09:52:21 -08:00
2024-01-25 22:18:45 -08:00
2024-01-25 22:18:45 -08:00
2024-01-17 09:55:58 -08:00
2024-01-17 09:55:58 -08:00
2024-01-25 22:18:45 -08:00