git: network - Fix race in accept() - try #2

看板DFBSD_commit作者時間15年前 (2010/09/17 17:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 5217bcbc2e93291d234b66b766c4801140f9d4f1 Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Fri Sep 17 01:45:04 2010 -0700 network - Fix race in accept() - try #2 * The last fix wasn't good enough. Really try to fix it this time. Use a pool token and validate so_head after acquiring it to deal with races, interlock against 0-ref races (sockets can be on the so_comp/so_incomp queues with 0 references), and use it for the accept predicate. Summary of changes: sys/kern/uipc_socket.c | 32 ++++++++++++++++++++++++-------- sys/kern/uipc_socket2.c | 26 +++++++++++++++++++------- sys/kern/uipc_syscalls.c | 10 +++++++--- sys/netgraph/ksocket/ng_ksocket.c | 6 +++--- 4 files changed, 53 insertions(+), 21 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5217bcbc2e93291d234b66b766c4801140f9d4f1 -- DragonFly BSD source repository
文章代碼(AID): #1CaovKQz (DFBSD_commit)