[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/55948 CVS commit: [netbsd-9] src/sys/kern
The following reply was made to PR kern/55948; it has been noted by GNATS.
From: "Martin Husemann" <martin%netbsd.org@localhost>
Subject: PR/55948 CVS commit: [netbsd-9] src/sys/kern
Date: Mon, 25 Jan 2021 14:12:50 +0000
Module Name: src
Committed By: martin
Date: Mon Jan 25 14:12:50 UTC 2021
src/sys/kern [netbsd-9]: kern_threadpool.c
Pull up following revision(s) (requested by riastradh in ticket #1187):
sys/kern/kern_threadpool.c: revision 1.23
threadpool(9): Fix synchronization between cancel and dispatch.
- threadpool_cancel_job_async tried to prevent
threadpool_dispatcher_thread from taking the job by setting
job->job_thread = NULL and then removing the job from the queue.
- But threadpool_cancel_job_async didn't notice job->job_thread is
null until after it also removes the job from the queue =>
The solution is to teach threadpool_dispatcher_thread to wait until
it has acquired the job lock to test whether job->job_thread is still
valid before it decides to remove the job from the queue.
Fixes PR kern/55948.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r184.108.40.206 src/sys/kern/kern_threadpool.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Main Index |
Thread Index |