|
|
cb8e9e |
From 9314a67565dc891186845d9af0cdf4ed09d5f009 Mon Sep 17 00:00:00 2001
|
|
|
cb8e9e |
From: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
cb8e9e |
Date: Thu, 11 Jun 2015 14:44:48 +0530
|
|
|
cb8e9e |
Subject: [PATCH 57/57] cluster/ec: Prevent Null dereference in dht-rename
|
|
|
cb8e9e |
|
|
|
cb8e9e |
Backport of http://review.gluster.com/11178
|
|
|
cb8e9e |
|
|
|
cb8e9e |
BUG: 1230522
|
|
|
cb8e9e |
Change-Id: I708d4d84b1341fb7cb515808836721735dc63f14
|
|
|
cb8e9e |
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
cb8e9e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/50510
|
|
|
cb8e9e |
---
|
|
|
cb8e9e |
tests/basic/ec/dht-rename.t | 19 +++++++++++++++++++
|
|
|
cb8e9e |
xlators/cluster/ec/src/ec-common.c | 2 +-
|
|
|
cb8e9e |
2 files changed, 20 insertions(+), 1 deletions(-)
|
|
|
cb8e9e |
create mode 100644 tests/basic/ec/dht-rename.t
|
|
|
cb8e9e |
|
|
|
cb8e9e |
diff --git a/tests/basic/ec/dht-rename.t b/tests/basic/ec/dht-rename.t
|
|
|
cb8e9e |
new file mode 100644
|
|
|
cb8e9e |
index 0000000..81b41ff
|
|
|
cb8e9e |
--- /dev/null
|
|
|
cb8e9e |
+++ b/tests/basic/ec/dht-rename.t
|
|
|
cb8e9e |
@@ -0,0 +1,19 @@
|
|
|
cb8e9e |
+#!/bin/bash
|
|
|
cb8e9e |
+
|
|
|
cb8e9e |
+. $(dirname $0)/../../include.rc
|
|
|
cb8e9e |
+. $(dirname $0)/../../volume.rc
|
|
|
cb8e9e |
+
|
|
|
cb8e9e |
+# This test checks notify part of ec
|
|
|
cb8e9e |
+
|
|
|
cb8e9e |
+cleanup
|
|
|
cb8e9e |
+TEST glusterd
|
|
|
cb8e9e |
+TEST pidof glusterd
|
|
|
cb8e9e |
+TEST $CLI volume create $V0 disperse 3 redundancy 1 $H0:$B0/${V0}{0..5}
|
|
|
cb8e9e |
+TEST $CLI volume start $V0
|
|
|
cb8e9e |
+
|
|
|
cb8e9e |
+TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0;
|
|
|
cb8e9e |
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "3" ec_child_up_count $V0 0
|
|
|
cb8e9e |
+
|
|
|
cb8e9e |
+TEST touch $M0/1
|
|
|
cb8e9e |
+TEST mv $M0/1 $M0/10
|
|
|
cb8e9e |
+cleanup
|
|
|
cb8e9e |
diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c
|
|
|
cb8e9e |
index d9f3442..a158637 100644
|
|
|
cb8e9e |
--- a/xlators/cluster/ec/src/ec-common.c
|
|
|
cb8e9e |
+++ b/xlators/cluster/ec/src/ec-common.c
|
|
|
cb8e9e |
@@ -1143,7 +1143,7 @@ void ec_get_real_size(ec_lock_link_t *link)
|
|
|
cb8e9e |
ec_fop_data_t *fop;
|
|
|
cb8e9e |
dict_t *xdata;
|
|
|
cb8e9e |
|
|
|
cb8e9e |
- if (link->base == NULL) {
|
|
|
cb8e9e |
+ if (link->base == NULL || link->base->inode == NULL) {
|
|
|
cb8e9e |
return;
|
|
|
cb8e9e |
}
|
|
|
cb8e9e |
|
|
|
cb8e9e |
--
|
|
|
cb8e9e |
1.7.1
|
|
|
cb8e9e |
|