DragonFly commits List (threaded) for 2010-09
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
git: kernel - Close small race in kqueue
commit 8e8e1c56e4ab8226e7fcc3ee738f7f9b023f85ea
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date: Thu Sep 23 17:24:53 2010 -0700
kernel - Close small race in kqueue
* Normalize the kn_status reprocessing code to close a race.
A knote_detach_and_drop() during a descriptor close can set
KN_DELETING and return, leaving a knote undergoing processing
by another thread marked deleted.
If the other thread is trying to execute a filter the filter can
wind up being run after the file pointer has been detached
from the knote, resulting in a panic.
* All KN_DELETING and KN_WAITING flags also now set KN_REPROCESS and
all KN_REPROCESS handling is dealt with the same way. The filter
is run if KN_REPROCESS is not set and if it is set any KN_DELETING
and KN_WAITING flags are dealt with before the filter is run.
Summary of changes:
sys/kern/kern_event.c | 56 ++++++++++++++++++++++++++++++------------------
1 files changed, 35 insertions(+), 21 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8e8e1c56e4ab8226e7fcc3ee738f7f9b023f85ea
--
DragonFly BSD source repository
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]