kernel - Fix exit races which can lead to a corrupt p_children list