feat(process): add timer cleanup on process exit#1797
Merged
fslongjin merged 2 commits intoDragonOS-Community:masterfrom Mar 1, 2026
Merged
feat(process): add timer cleanup on process exit#1797fslongjin merged 2 commits intoDragonOS-Community:masterfrom
fslongjin merged 2 commits intoDragonOS-Community:masterfrom
Conversation
- Implement`exit_timers()`method to clean up alarm, itimer, and POSIX timers - Add`timer_ids()`method to iterate over POSIX timer IDs - Refactor alarm timer to use weak reference to PCB for safety Signed-off-by: longjin <longjin@DragonOS.org>
do_lookup_follow_symlink() previously followed symlinks via recursive calls to lookup_follow_symlink2(), with up to 40 levels of recursion. Each stack frame allocated a 256-byte read buffer, multiple Strings, and metadata queries, causing kernel stack overflow when deeply nested symlinks were encountered (e.g. gVisor ExecTest.SymlinkLimitExceeded). Replace the recursive approach with an iterative loop that updates result, rest_path, and a symlink_follows_remaining counter in-place. Absolute symlink targets restart resolution from process_root_inode; relative targets continue from the current directory. Stack usage is now O(1) regardless of symlink nesting depth. Signed-off-by: longjin <longjin@DragonOS.org>
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.
exit_timers()method to clean up alarm, itimer, and POSIX timerstimer_ids()method to iterate over POSIX timer IDs