From 3c75958d1948753976405f848f59326fc1896c95 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Wed, 18 Aug 2010 07:49:15 +0000 Subject: Fix memory corruption in mem pool Added new interface mem_get0, which calls memset on the mem pool entries being returned. Gluster and Kernel compile should now succeed. Signed-off-by: shishir gowda Signed-off-by: Anand V. Avati BUG: 1393 (Gluster and kernel compile fails) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1393 --- libglusterfs/src/stack.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libglusterfs/src/stack.h') diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h index ad8abe1ea..55bcecc4b 100644 --- a/libglusterfs/src/stack.h +++ b/libglusterfs/src/stack.h @@ -198,7 +198,7 @@ STACK_DESTROY (call_stack_t *stack) call_frame_t *_new = NULL; \ xlator_t *old_THIS = NULL; \ \ - _new = mem_get (frame->root->pool->frame_mem_pool); \ + _new = mem_get0 (frame->root->pool->frame_mem_pool); \ if (!_new) { \ gf_log ("stack", GF_LOG_ERROR, "alloc failed"); \ break; \ @@ -235,7 +235,7 @@ STACK_DESTROY (call_stack_t *stack) call_frame_t *_new = NULL; \ xlator_t *old_THIS = NULL; \ \ - _new = mem_get(frame->root->pool->frame_mem_pool); \ + _new = mem_get0 (frame->root->pool->frame_mem_pool); \ if (!_new) { \ gf_log ("stack", GF_LOG_ERROR, "alloc failed"); \ break; \ @@ -330,7 +330,7 @@ copy_frame (call_frame_t *frame) return NULL; } - newstack = mem_get (frame->root->pool->stack_mem_pool); + newstack = mem_get0 (frame->root->pool->stack_mem_pool); if (newstack == NULL) { return NULL; } @@ -373,7 +373,7 @@ create_frame (xlator_t *xl, call_pool_t *pool) return NULL; } - stack = mem_get (pool->stack_mem_pool); + stack = mem_get0 (pool->stack_mem_pool); if (!stack) return NULL; -- cgit