When registering vmas for uprobe, skip the vmas in an mm that is marked
unstable. Modifying a vma in an unstable mm may cause issues if the mm
isn't fully initialised.__
Is there anything preventing us from just leaving a proper tree that
reflects reality in place before we drop the write lock?
When you mean proper tree, is this about the your previous question? --
Shouldn't we just remove anything from the tree here that was not copied
immediately?
Commit d24062914837 (" fork: use __mt_dup() to duplicate maple tree in
dup_mmap()") did this for efficiency, so it'd be a regression to do this.
We're talking about the case where fork *fails*. That cannot possibly be
relevant for performance, can it? :)
I think it optimises the overall operation, but as a product of that, has to
handle this edge case, and that necessitated this rather horrble stuff.
Obviously we don't need to optimise a 'we are about to die' case :)