From 0acd0b45e5ee22eb5bb35c21093136b3b062744f Mon Sep 17 00:00:00 2001 From: vmallika Date: Fri, 17 Jul 2015 12:50:59 +0530 Subject: quota/marker: contribution with list_del can cause mem corruption There is a possibility that contribution is removed twice from list during unlink operation (with hard links) or during rename operation Use list_del_init for a thread safe deltion of member from list Change-Id: Iff5e0c03cc8f0ed85da0db1739b84b695abf9ea6 BUG: 1244109 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/11706 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Krishnan Parthasarathi Reviewed-by: Raghavendra G --- xlators/features/marker/src/marker-quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/features/marker/src/marker-quota.c') diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index a5ef0bb2321..52b930fb438 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -4173,7 +4173,7 @@ mq_forget (xlator_t *this, quota_inode_ctx_t *ctx) list_for_each_entry_safe (contri, next, &ctx->contribution_head, contri_list) { - list_del (&contri->contri_list); + list_del_init (&contri->contri_list); GF_REF_PUT (contri); } -- cgit