From 31ccc76f83a8035f58d26fffe9d100b287e285b6 Mon Sep 17 00:00:00 2001 From: vmallika Date: Thu, 8 Oct 2015 12:37:42 +0530 Subject: quota: fix crash in quota_fallocate This is a backport of http://review.gluster.org/#/c/12314/ list head was not initialized and brick was crashing with fallocate. This patch fixes the issue > Change-Id: I9757b88eab61054892f0fe3de63af2683cd4fef7 > BUG: 1269754 > Signed-off-by: vmallika Change-Id: I516881f06de16c7092f29d8991d083418765ac79 BUG: 1269530 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/12315 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Raghavendra G --- xlators/features/quota/src/quota.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators/features/quota') diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 3b803a0ca39..aceb6fc6b73 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -4815,6 +4815,8 @@ quota_fallocate(call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t mode, WIND_IF_QUOTAOFF (priv->is_quota_on, off); + INIT_LIST_HEAD (&head); + GF_ASSERT (frame); GF_VALIDATE_OR_GOTO ("quota", this, unwind); GF_VALIDATE_OR_GOTO (this->name, fd, unwind); -- cgit