From 592f04507ba9502cec7aceb33ea4c653ed7e1340 Mon Sep 17 00:00:00 2001 From: Cameron Badman Date: Wed, 18 Mar 2026 23:47:10 +1000 Subject: [PATCH] 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 --- criu/files-reg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/criu/files-reg.c b/criu/files-reg.c index 66c0e6cda..3c74e6452 100644 --- a/criu/files-reg.c +++ b/criu/files-reg.c @@ -2216,6 +2216,7 @@ int open_path(struct file_desc *d, int (*open_cb)(int mntns_root, struct reg_fil rfi->path = path; goto ext; } + pr_warn("External file %s has no --inherit-fd mapping on restore\n", rfi->rfe->name); } if (rfi->remap) {