- 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:
parent
0b4793efb7
commit
bdb5bdf0b7
@ -343,7 +343,12 @@ thread_alloc(void)
|
|||||||
void
|
void
|
||||||
thread_free(struct thread *td)
|
thread_free(struct thread *td)
|
||||||
{
|
{
|
||||||
|
#ifdef KSE
|
||||||
|
if (td->td_cpuset != NULL)
|
||||||
|
cpuset_rel(td->td_cpuset);
|
||||||
|
#else
|
||||||
cpuset_rel(td->td_cpuset);
|
cpuset_rel(td->td_cpuset);
|
||||||
|
#endif
|
||||||
td->td_cpuset = NULL;
|
td->td_cpuset = NULL;
|
||||||
cpu_thread_free(td);
|
cpu_thread_free(td);
|
||||||
if (td->td_altkstack != 0)
|
if (td->td_altkstack != 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user