fix: replace assert() with error reply in hello_ll xattr handlers (issue #836)#8
Open
ShukantPal wants to merge 2 commits intomasterfrom
Open
fix: replace assert() with error reply in hello_ll xattr handlers (issue #836)#8ShukantPal wants to merge 2 commits intomasterfrom
ShukantPal wants to merge 2 commits intomasterfrom
Conversation
…sue libfuse#836) The hello_ll example crashed when getxattr/setxattr/removexattr were called for unexpected inodes, because assert() would abort the process. The kernel can invoke xattr operations for any inode, so replace asserts with proper fuse_reply_err() calls that gracefully return ENODATA or ENOTSUP instead of crashing.
|
|
…use#836) Add test_hello_ll_root_xattr that mounts hello_ll and performs xattr operations on the root directory (inode 1). Without the fix, the assert(ino == 2) in the xattr handlers causes SIGABRT when getxattr is called on the root directory. With the fix, proper error codes are returned instead.
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.
The hello_ll example crashed when getxattr/setxattr/removexattr were
called for unexpected inodes, because assert() would abort the process.
The kernel can invoke xattr operations for any inode, so replace asserts
with proper fuse_reply_err() calls that gracefully return ENODATA or
ENOTSUP instead of crashing.