[PATCH 5.7 468/477] sample-trace-array: Fix sleeping function called from invalid context