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
Open
files-reg: warn when external file has no inherit-fd mapping on restore#2973CameronBadman wants to merge 1 commit intocheckpoint-restore:criu-devfrom
CameronBadman wants to merge 1 commit intocheckpoint-restore:criu-devfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.