Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux: Ensure task listing functions yield only valid tasks #1542

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

gcmoreira
Copy link
Contributor

@gcmoreira gcmoreira commented Jan 13, 2025

In the context of #1516 and related issues, we noticed that core functions responsible for yielding tasks sometimes include entries that are either dead or invalid.

This pull request addresses these scenarios to improve task handling and ensure robust functionality.

close: #1518

if not (self.signal and self.signal.is_readable()):
return False

if not (self.nsproxy and self.nsproxy.is_readable()):
Copy link
Contributor

@atcuno atcuno Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nsproxy is not present in some really old kernels. We should have this check dependent on it being present.

Copy link
Contributor Author

@gcmoreira gcmoreira Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, nsproxy was added way back in 2.6.19 :S .. that's super old. For reference, here's the commit: ab516013ad9ca47f1d3a936fa81303bfbf734d52 introduced over 18 years ago. I can check if that exists if you'd like but honestly, I'm pretty sure Vol3 would run into issues elsewhere with kernels that ancient

Copy link
Contributor Author

@gcmoreira gcmoreira Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atcuno done. I also added checks for the other members to ensure there's no potential issue in the future with ancient or weird custom kernels. Well, except for mm, which should always be present.

Copy link
Contributor Author

@gcmoreira gcmoreira Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also added another quick validation check before performing the more expensive checks. Since pid and tgid have been present at least since kernel 2.4.0, it shouldn't be an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants