- KSE may free a thread that was never actually forked. This will leave

td_cpuset NULL.  Check for this condition before dereferencing the
   cpuset.

Reported by:	david@catwhisker.org, miwi@freebsd.org
Sponsored by:	Nokia
This commit is contained in:
Jeff Roberson 2008-03-12 05:01:14 +00:00
parent 0b4793efb7
commit bdb5bdf0b7

View File

@ -343,7 +343,12 @@ thread_alloc(void)
void
thread_free(struct thread *td)
{
#ifdef KSE
if (td->td_cpuset != NULL)
cpuset_rel(td->td_cpuset);
#else
cpuset_rel(td->td_cpuset);
#endif
td->td_cpuset = NULL;
cpu_thread_free(td);
if (td->td_altkstack != 0)