Skip to content
Commit 9eb9abb6 authored by Andy Tucker's avatar Andy Tucker Committed by Andrei Vagin
Browse files

files: Fail dump if dump_one_file() fails



When dumping a process with a large number of open files,
dump_task_files_seized() processes the fds in batches. If
dump_one_file() results in an error, processing of the current batch is
stopped but the next batch (if any) will still be fetched and the error
value is overwritten. The result is a corrupt dump image (the fdinfo
file is missing a bunch of fds) which results in restore failure.

Also close all received fds after an error (previously the skipped ones
were left open).

Signed-off-by: default avatarAndy Tucker <agtucker@google.com>
Reviewed-by: default avatarDmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: default avatarAndrei Vagin <avagin@virtuozzo.com>
parent 3e86fb12
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment