]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - kernel/fork.c
fork: unconditionally clear stack on fork
[mirror_ubuntu-bionic-kernel.git] / kernel / fork.c
index 778a1f688d1a197d983c8cbf8aede6146a49308d..caaeaea5af5e853c526778cbdec3bb4e8ce0fbf2 100644 (file)
@@ -220,10 +220,9 @@ static unsigned long *alloc_thread_stack_node(struct task_struct *tsk, int node)
                if (!s)
                        continue;
 
-#ifdef CONFIG_DEBUG_KMEMLEAK
                /* Clear stale pointers from reused stack. */
                memset(s->addr, 0, THREAD_SIZE);
-#endif
+
                tsk->stack_vm_area = s;
                return s->addr;
        }