NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/45187 CVS commit: src/sys/kern



The following reply was made to PR kern/45187; it has been noted by GNATS.

From: "Juergen Hannken-Illjes" <hannken%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/45187 CVS commit: src/sys/kern
Date: Sat, 6 Aug 2011 11:04:25 +0000

 Module Name:   src
 Committed By:  hannken
 Date:          Sat Aug  6 11:04:25 UTC 2011
 
 Modified Files:
        src/sys/kern: sys_select.c
 
 Log Message:
 Fix the races of direct select()/poll():
 
 - When sel_do_scan() restarts do a full initialization with selclear() so
   we start from an empty set without registered events.  Defer the
   evaluation of l_selret after selclear() and add the count of direct events
   to the count of events.
 
 - For selscan()/pollscan() zero the output descriptors before we poll and
   for selscan() take the sc_lock before we change them.
 
 - Change sel_setevents() to not count events already set.
 
 Reviewed by: YAMAMOTO Takashi <yamt%netbsd.org@localhost>
 
 Should fix PR #44763 (select/poll direct-set optimization seems racy)
        and PR #45187 (select(2) sometimes doesn't wakeup)
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.33 -r1.34 src/sys/kern/sys_select.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index