summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2009-12-04 03:50:47 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-12-04 01:46:23 -0800
commit290a38912ce9f942f4ebdd24fcb0033214ecc537 (patch)
treec73ed4238ee2ecb65648e8f58af5ba95a01f1fb8 /xlators/protocol/server
parente7b86dedcdde48e37a2d50370998d7285624bdb8 (diff)
protcol/server: server_connection_destroy - destroy frame after issuing flush
frame was getting destroyed after unlocking, but before issuing flush. This could result in corruption if an fd was opened between server_connection_cleanup and server_connection_destroy because of pending open calls in io-threads at the time of POLLERR disconnection Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 430 (Server crash when client is killed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=430
Diffstat (limited to 'xlators/protocol/server')
-rw-r--r--xlators/protocol/server/src/server-helpers.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c
index 5e681c507f3..112712e7f87 100644
--- a/xlators/protocol/server/src/server-helpers.c
+++ b/xlators/protocol/server/src/server-helpers.c
@@ -802,11 +802,6 @@ server_connection_destroy (xlator_t *this, server_connection_t *conn)
free (locker);
}
- state = CALL_STATE (frame);
- if (state)
- free (state);
- STACK_DESTROY (frame->root);
-
pthread_mutex_lock (&(conn->lock));
{
if (conn->fdtable) {
@@ -836,6 +831,11 @@ server_connection_destroy (xlator_t *this, server_connection_t *conn)
}
}
+ state = CALL_STATE (frame);
+ if (state)
+ free (state);
+ STACK_DESTROY (frame->root);
+
gf_log (this->name, GF_LOG_INFO, "destroyed connection of %s",
conn->id);