Gotta ptrace_unlink before calling release_task, and instead of fiddling with the real_parent directly.
Attach a file by drag & drop or click to upload