From efa8477013d98a26283302ecb42d4ba606ce405e Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Thu, 27 Jun 2019 19:17:29 +0530 Subject: graph/shd: Use top down approach while cleaning xlator We were cleaning xlator from botton to top, which might lead to problems when upper xlators trying to access the xlator object loaded below. One such scenario is when fd_unref happens as part of the fini call which might lead to calling the releasedir to lower xlator. This will lead to invalid mem access Change-Id: I8a6cb619256fab0b0c01a2d564fc88287c4415a0 Updates: bz#1716695 Signed-off-by: Mohammed Rafi KC --- xlators/features/bit-rot/src/stub/bit-rot-stub.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/features/bit-rot/src') diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.c b/xlators/features/bit-rot/src/stub/bit-rot-stub.c index e6d64de99a9..de2184d6193 100644 --- a/xlators/features/bit-rot/src/stub/bit-rot-stub.c +++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.c @@ -196,6 +196,7 @@ cleanup_lock: pthread_mutex_destroy(&priv->lock); free_mempool: mem_pool_destroy(priv->local_pool); + priv->local_pool = NULL; free_priv: GF_FREE(priv); this->private = NULL; -- cgit