git: kernel - close numerous kqueue MP and blocking races

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Aug 21 18:46:44 PDT 2010


commit cf9f4e88a67efbe26053ec74dc81d4f8e6c5bafc
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Aug 21 18:41:15 2010 -0700

    kernel - close numerous kqueue MP and blocking races
    
    * create race
    
    	Close a race where one thread registers a kevent and blocks in
    	f_attach allowing another thread to register a change or deletion
    	on the same event.
    
    * delete race
    
    	Close a race where one thread deletes a kevent and blocks in
    	f_detach allowing another thread to register a change or deletion
    	on the same event.
    
    * scan/close race
    
    	Close a race where one thread is in the middle of a kqueue_scan()
    	and another concurrently close()s a related file descriptor.  This
    	could cause select and poll to loop forever due to not being able
    	to delete the 'spurious' kevent.
    
    * register/close race
    
    	Close a race where one thread registers a kevent and blocks
    	in f_attach and another thread close()s the related file
    	descriptor at the same time.

Summary of changes:
 sys/kern/kern_descrip.c |   12 +++--
 sys/kern/kern_event.c   |  112 +++++++++++++++++++++++++++++++++++-----------
 sys/sys/event.h         |    2 +
 sys/sys/file.h          |    1 +
 4 files changed, 95 insertions(+), 32 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/cf9f4e88a67efbe26053ec74dc81d4f8e6c5bafc


-- 
DragonFly BSD source repository





More information about the Commits mailing list