Skip to content

Commit 2d902dd

Browse files
committed
files-reg: warn when external file has no inherit-fd mapping on restore
In open_path(), when inherit_fd_lookup_id() returns negative for an external file, execution silently falls through to the normal open path causing an incorrect size mismatch error. Added a pr_warn() to make the failure explicit. Fixes: #2951 Signed-off-by: Cameron Badman <cbadwork@gmail.com>
1 parent 33e340b commit 2d902dd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

criu/files-reg.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2216,6 +2216,7 @@ int open_path(struct file_desc *d, int (*open_cb)(int mntns_root, struct reg_fil
22162216
rfi->path = path;
22172217
goto ext;
22182218
}
2219+
pr_warn("External file %s has no --inherit-fd mapping on restore\n", rfi->rfe->name);
22192220
}
22202221

22212222
if (rfi->remap) {

0 commit comments

Comments
 (0)