trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z..@apache.org
Subject git commit: TS-1006: Fix double-linked list initialization in reclaimable_freelist_new
Date Wed, 06 Feb 2013 09:38:10 GMT
Updated Branches:
  refs/heads/master bc7a84441 -> 61d0d2c11


TS-1006: Fix double-linked list initialization in reclaimable_freelist_new

This bug broke the double-linked list which would prevent self-thread
"stealing" memory from other threads. It was found by Weijin when he
reviewed the code, thans a lot!

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
Signed-off-by: Zhao Yongming <ming.zym@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/61d0d2c1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/61d0d2c1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/61d0d2c1

Branch: refs/heads/master
Commit: 61d0d2c11de9c7c8fe7822438c82deb2848ad107
Parents: bc7a844
Author: Yunkai Zhang <qiushu.zyk@taobao.com>
Authored: Wed Feb 6 16:27:06 2013 +0800
Committer: Zhao Yongming <ming.zym@gmail.com>
Committed: Wed Feb 6 17:26:15 2013 +0800

----------------------------------------------------------------------
 lib/ts/ink_queue_ext.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/61d0d2c1/lib/ts/ink_queue_ext.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_queue_ext.cc b/lib/ts/ink_queue_ext.cc
index 7060f1a..39c3fb4 100644
--- a/lib/ts/ink_queue_ext.cc
+++ b/lib/ts/ink_queue_ext.cc
@@ -529,8 +529,8 @@ reclaimable_freelist_new(InkFreeList *f)
        * statement's sequence is important for us. */
       pCache->next = f->pThreadCache;
       pCache->prev = f->pThreadCache->prev;
-      f->pThreadCache->prev = pCache;
-      f->pThreadCache->prev->next = pCache;
+      pCache->next->prev = pCache;
+      pCache->prev->next = pCache;
     } else {
       pCache->next = pCache;
       pCache->prev = pCache;


Mime
View raw message