HomeFreeBSD

- Fix the last of the threading bugs that were introduced as far back as

Description

  • Fix the last of the threading bugs that were introduced as far back as 1.38 in 2001. Break out of the FOREACH_THREAD_IN_PROC loop when we've discovered a new proc in the chain.
  • Increment i and check for maxlockdepth once per matching process not once per thread. This didn't properly terminate the loop before.
  • Fix a bug which has existed potentially since rev 1.1. waitblock->lf_next can be NULL when a thread has been woken-up but not yet scheduled. Check for this condition rather than blindly dereferencing.

Found by: libMicro

Details

Provenance
jeffAuthored on Mar 19 2008, 7:13 AM
Parents
rG86a06c600090: if passed thread pointer is equal to current thread, pass -1 to kernel
Branches
Unknown
Tags
Unknown

Event Timeline