git: kernel - Fix possible race in syncache

看板DFBSD_commit作者時間15年前 (2010/08/19 03:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit c1d0893d667ee18127bd3d2e371b820d65c5c0c2 Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Wed Aug 18 12:22:49 2010 -0700 kernel - Fix possible race in syncache * syncache_timer_handler() can block while dropping a syncache entry, potentially causing the next pointer it uses in its list iteration to become stale. * Use a list marker to keep tabs on the list position instead of using a next pointer. * Remove critical sections, callouts do not preempt and syncache routines can only be entered from protocol threads or callouts. * Document the callout code as not preempting other threads. Reported-by: Peter Avalos <pavalos@theshell.com> Summary of changes: sys/kern/kern_timeout.c | 19 ++++--------- sys/netinet/tcp_syncache.c | 63 +++++++++++++++++++++++++++---------------- sys/netinet/tcp_var.h | 1 + 3 files changed, 46 insertions(+), 37 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c1d0893d667ee18127bd3d2e371b820d65c5c0c2 -- DragonFly BSD source repository
文章代碼(AID): #1CR3Ksoo (DFBSD_commit)