drm/v3d: Use drmm_add_final_kfree
[sfrench/cifs-2.6.git] / kernel / exit.c
index 2833ffb0c2110c482010954e73ed836395eaa6a6..0b81b26a872a066fca5b6fbdd78404e9a2570d49 100644 (file)
@@ -619,8 +619,8 @@ static void forget_original_parent(struct task_struct *father,
        reaper = find_new_reaper(father, reaper);
        list_for_each_entry(p, &father->children, sibling) {
                for_each_thread(p, t) {
-                       t->real_parent = reaper;
-                       BUG_ON((!t->ptrace) != (t->parent == father));
+                       RCU_INIT_POINTER(t->real_parent, reaper);
+                       BUG_ON((!t->ptrace) != (rcu_access_pointer(t->parent) == father));
                        if (likely(!t->ptrace))
                                t->parent = t->real_parent;
                        if (t->pdeath_signal)