7f4c2a
From 35a5ef27ba8a8da2b78e6d58a7385d4d443445bd Mon Sep 17 00:00:00 2001
7f4c2a
From: Anuradha <atalur@redhat.com>
7f4c2a
Date: Mon, 25 May 2015 11:07:27 +0530
7f4c2a
Subject: [PATCH 02/18] features/quota : Do unwind if postbuf is NULL
7f4c2a
7f4c2a
If postbuf in quota_writev_cbk is NULL directly
7f4c2a
an unwind should be done. Trying to dereference
7f4c2a
it will lead to a crash.
7f4c2a
7f4c2a
Change-Id: Idba6ce3cd1bbf37ede96c7f17d01007d6c07057a
7f4c2a
BUG: 1224225
7f4c2a
Reviewed-on: http://review.gluster.org/10898
7f4c2a
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
7f4c2a
Tested-by: Gluster Build System <jenkins@build.gluster.com>
7f4c2a
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
7f4c2a
Tested-by: Raghavendra G <rgowdapp@redhat.com>
7f4c2a
Reviewed-on: http://review.gluster.org/11040
7f4c2a
Signed-off-by: Anuradha Talur <atalur@redhat.com>
7f4c2a
Reviewed-on: https://code.engineering.redhat.com/gerrit/49889
7f4c2a
Reviewed-by: Sachin Pandit <spandit@redhat.com>
7f4c2a
Reviewed-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
7f4c2a
Tested-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
7f4c2a
---
7f4c2a
 xlators/features/quota/src/quota.c | 2 +-
7f4c2a
 1 file changed, 1 insertion(+), 1 deletion(-)
7f4c2a
7f4c2a
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
7f4c2a
index d8bacb7..a649df8 100644
7f4c2a
--- a/xlators/features/quota/src/quota.c
7f4c2a
+++ b/xlators/features/quota/src/quota.c
7f4c2a
@@ -1500,7 +1500,7 @@ quota_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
7f4c2a
 
7f4c2a
         local = frame->local;
7f4c2a
 
7f4c2a
-        if ((op_ret < 0) || (local == NULL)) {
7f4c2a
+        if ((op_ret < 0) || (local == NULL) || (postbuf == NULL)) {
7f4c2a
                 goto out;
7f4c2a
         }
7f4c2a
 
7f4c2a
-- 
7f4c2a
1.9.3
7f4c2a