mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-05 08:00:30 +00:00
Don't forget to initialize a tailq before using it.
MFC candidate Noticed by: luoqi
This commit is contained in:
parent
94f0972bec
commit
9fcaf8a4ab
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155745
|
@ -1337,6 +1337,7 @@ kseg_gc(struct pthread *curthread)
|
|||
|
||||
if (free_kseg_count <= MAX_CACHED_KSEGS)
|
||||
return;
|
||||
TAILQ_INIT(&worklist);
|
||||
crit = _kse_critical_enter();
|
||||
KSE_LOCK_ACQUIRE(curthread->kse, &kse_lock);
|
||||
while (free_kseg_count > MAX_CACHED_KSEGS) {
|
||||
|
|
|
@ -1337,6 +1337,7 @@ kseg_gc(struct pthread *curthread)
|
|||
|
||||
if (free_kseg_count <= MAX_CACHED_KSEGS)
|
||||
return;
|
||||
TAILQ_INIT(&worklist);
|
||||
crit = _kse_critical_enter();
|
||||
KSE_LOCK_ACQUIRE(curthread->kse, &kse_lock);
|
||||
while (free_kseg_count > MAX_CACHED_KSEGS) {
|
||||
|
|
Loading…
Reference in a new issue