Initialize td_sel in the thread_init(). Struct thread is not zeroed
on the initial allocation, but seltdinit() assumes that td_sel is NULL or a valid pointer. Note that thread_fini()/seltdfini() also relies on this, but correctly resets td_sel to NULL. Submitted by: luke.tw@gmail.com PR: 199518 MFC after: 1 week
This commit is contained in:
parent
962ac6c727
commit
ad8b1d857d
@ -209,6 +209,7 @@ thread_init(void *mem, int size, int flags)
|
||||
td->td_sched = (struct td_sched *)&td[1];
|
||||
umtx_thread_init(td);
|
||||
td->td_kstack = 0;
|
||||
td->td_sel = NULL;
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user