Fix deadlock in ps exited filter

Fixes #8909

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Merge pull request #8929 from LK4D4/fix_filter_hang

Fix deadlock in ps exited filter