diff options
author | shishir gowda <shishirng@gluster.com> | 2010-08-18 07:49:15 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-08-18 06:55:46 -0700 |
commit | 3c75958d1948753976405f848f59326fc1896c95 (patch) | |
tree | f66374dd0257add11eafd50ed1b6093ed4f80b37 /libglusterfs/src/stack.h | |
parent | 0b890833c8cba9bac71877e528d810eba91dd1e6 (diff) |
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 <shishirng@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1393 (Gluster and kernel compile fails)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1393
Diffstat (limited to 'libglusterfs/src/stack.h')
-rw-r--r-- | libglusterfs/src/stack.h | 8 |
1 files changed, 4 insertions, 4 deletions
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; |