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:
Konstantin Belousov 2015-04-18 17:21:12 +00:00
parent 962ac6c727
commit ad8b1d857d

View File

@ -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);
}