The code assumed that all handles (other than TYPE_FILE and TYPE_DEV) had an associated PAL handle, which caused a crash when polling files from /proc. This change adds support for polling TYPE_STR, and also adds a check for PAL handle in all cases.
(I think poll deserves a bigger rewrite, this is just a quick fix).
How to test this PR?
The procfs stress test (stress-ng --procfs 8 --timeout 40s) stopped crashing for me (see #2419).
I rewrote poll regression test to be more thorough, it checks several types of files now.
Found when investigating
stress-ng
(#2419).Description of the changes
The code assumed that all handles (other than TYPE_FILE and TYPE_DEV) had an associated PAL handle, which caused a crash when polling files from /proc. This change adds support for polling TYPE_STR, and also adds a check for PAL handle in all cases.
(I think poll deserves a bigger rewrite, this is just a quick fix).
How to test this PR?
stress-ng --procfs 8 --timeout 40s
) stopped crashing for me (see #2419).poll
regression test to be more thorough, it checks several types of files now.This change is