From 991b61661d74de5b1349050308dbd131e0de607c Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Tue, 22 Feb 2011 05:25:30 +0000 Subject: check the op_ret for less than zero in sp_create_cbk since posix can send negative values other than -1 posix can send -ve values other than -1 in create: op_ret = setgid_override (this, real_path, &gid); if (op_ret < 0) { goto out; } In stat-prefetch we check op_ret only for -1 which results in function proceeding and op_ret may become 0 due to other function calls in sp_create_cbk, hence crashes in fuse. Signed-off-by: Raghavendra Bhat Signed-off-by: Raghavendra G Signed-off-by: Anand V. Avati BUG: 2409 (crash in stat prefetch) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2409 --- xlators/performance/stat-prefetch/src/stat-prefetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c index ac0646c44..3d82174fe 100644 --- a/xlators/performance/stat-prefetch/src/stat-prefetch.c +++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c @@ -1477,7 +1477,7 @@ sp_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this, sp_fd_ctx_t *fd_ctx = NULL; char lookup_in_progress = 0, looked_up = 0; - if (op_ret == -1) { + if (op_ret < 0) { goto out; } -- cgit