]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/fork.c
Merge tag 'xfs-5.5-merge-16' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[linux.git] / kernel / fork.c
index 00b64f41c2b444a74945a4d2ed25aeb86edf91e5..21c6c1e29b98e10d2349bf444098985bee635ea8 100644 (file)
@@ -40,7 +40,6 @@
 #include <linux/binfmts.h>
 #include <linux/mman.h>
 #include <linux/mmu_notifier.h>
-#include <linux/hmm.h>
 #include <linux/fs.h>
 #include <linux/mm.h>
 #include <linux/vmacache.h>
@@ -94,6 +93,7 @@
 #include <linux/livepatch.h>
 #include <linux/thread_info.h>
 #include <linux/stackleak.h>
+#include <linux/kasan.h>
 
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
@@ -224,6 +224,9 @@ static unsigned long *alloc_thread_stack_node(struct task_struct *tsk, int node)
                if (!s)
                        continue;
 
+               /* Clear the KASAN shadow of the stack. */
+               kasan_unpoison_shadow(s->addr, THREAD_SIZE);
+
                /* Clear stale pointers from reused stack. */
                memset(s->addr, 0, THREAD_SIZE);