Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115983499
D42986.id131223.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
644 B
Referenced Files
None
Subscribers
None
D42986.id131223.diff
View Options
diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c
--- a/sys/kern/kern_kthread.c
+++ b/sys/kern/kern_kthread.c
@@ -286,6 +286,13 @@
}
oldtd = FIRST_THREAD_IN_PROC(p);
+ /*
+ * Set the new thread pointer before the thread starts running: *newtdp
+ * could be a pointer that is referenced by "func".
+ */
+ if (newtdp != NULL)
+ *newtdp = newtd;
+
bzero(&newtd->td_startzero,
__rangeof(struct thread, td_startzero, td_endzero));
bcopy(&oldtd->td_startcopy, &newtd->td_startcopy,
@@ -330,8 +337,6 @@
thread_lock(newtd);
sched_add(newtd, SRQ_BORING);
}
- if (newtdp)
- *newtdp = newtd;
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 2, 5:09 AM (14 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17899054
Default Alt Text
D42986.id131223.diff (644 B)
Attached To
Mode
D42986: kthread: Set *newtdb earlier in kthread_add1()
Attached
Detach File
Event Timeline
Log In to Comment