-
Notifications
You must be signed in to change notification settings - Fork 480
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
base: develop
Are you sure you want to change the base?
linux: Ensure task listing functions yield only valid tasks #1542
Conversation
if not (self.signal and self.signal.is_readable()): | ||
return False | ||
|
||
if not (self.nsproxy and self.nsproxy.is_readable()): |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
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