[PATCHv3] exec: Fix a deadlock in ptrace