From 3eb79f8704909d118a694d9c41c5b97fa558aa91 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Thu, 22 Apr 2010 00:47:19 +0000 Subject: core: Set ctx in global_xlator to prevent NULL ptr reference This results in a crash in STACK_UNWIND after a call bail out. Since the call bail does not occur in the context of an xlator, the old_THIS in STACK_UNWIND is handed a global_xlator which did not have its ctx set, resulting in a NULL de-reference. Signed-off-by: Shehjar Tikoo Signed-off-by: Anand V. Avati BUG: 844 (mixed testing with 35 clients) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=844 --- libglusterfs/src/globals.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libglusterfs') diff --git a/libglusterfs/src/globals.c b/libglusterfs/src/globals.c index 68a843b25..cdb561de1 100644 --- a/libglusterfs/src/globals.c +++ b/libglusterfs/src/globals.c @@ -87,6 +87,7 @@ glusterfs_this_init () global_xlator.name = "glusterfs"; global_xlator.type = "global"; + global_xlator.ctx = glusterfs_ctx; return ret; } -- cgit