x86, ptrace, mm: fix double-free on race