Skip to content

files-reg: warn when external file has no inherit-fd mapping on restore#2973

Open
CameronBadman wants to merge 1 commit intocheckpoint-restore:criu-devfrom
CameronBadman:fix/external-file-warn
Open

files-reg: warn when external file has no inherit-fd mapping on restore#2973
CameronBadman wants to merge 1 commit intocheckpoint-restore:criu-devfrom
CameronBadman:fix/external-file-warn

Conversation

@CameronBadman
Copy link
Copy Markdown

@CameronBadman CameronBadman commented Mar 18, 2026

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

Note: unable to fully reproduce in CRIU 4.2 as should_check_size() appears to mask this path for O_APPEND|O_WRONLY files, but the code path exists.

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: checkpoint-restore#2951
Signed-off-by: Cameron Badman <cbadwork@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inherited File Descriptor Issue When Checkpointing Processes in Wayland/Hyprland Sessions

1 participant