Module Name:    src
Committed By:   riastradh
Date:           Tue Sep 13 09:37:49 UTC 2022

Modified Files:
        src/sys/kern: kern_kthread.c

Log Message:
kthread(9): Attribute uarea to caller for kmsan.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/kern/kern_kthread.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/kern_kthread.c
diff -u src/sys/kern/kern_kthread.c:1.46 src/sys/kern/kern_kthread.c:1.47
--- src/sys/kern/kern_kthread.c:1.46	Sat Aug  1 02:04:55 2020
+++ src/sys/kern/kern_kthread.c	Tue Sep 13 09:37:49 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_kthread.c,v 1.46 2020/08/01 02:04:55 riastradh Exp $	*/
+/*	$NetBSD: kern_kthread.c,v 1.47 2022/09/13 09:37:49 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2007, 2009, 2019 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_kthread.c,v 1.46 2020/08/01 02:04:55 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_kthread.c,v 1.47 2022/09/13 09:37:49 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -41,6 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_kthread
 #include <sys/mutex.h>
 #include <sys/sched.h>
 #include <sys/kmem.h>
+#include <sys/msan.h>
 
 #include <uvm/uvm_extern.h>
 
@@ -76,6 +77,7 @@ kthread_create(pri_t pri, int flag, stru
 	if (uaddr == 0) {
 		return ENOMEM;
 	}
+	kmsan_orig((void *)uaddr, USPACE, KMSAN_TYPE_POOL, __RET_ADDR);
 	if ((flag & KTHREAD_TS) != 0) {
 		lc = SCHED_OTHER;
 	} else {

Reply via email to