fix race between kp_wait and workload task execution

Not sure whether this is the right fix, but it never hangs in make test for me now :P