From eac5268e87a9ffeefaa5edcd40392e14cd5aa1e3 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Fri, 25 Mar 2011 13:38:39 +0100 Subject: Fix possible deadlock on reconnection Reported by Florian Zumbiehl --- ChangeLog | 5 +++++ sshfs.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 203b98f..3ce4ed3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-03-25 Miklos Szeredi + + * Fix possible deadlock on reconnection. Reported by Florian + Zumbiehl + 2011-01-25 Miklos Szeredi * Fix cleanup when ssh connection is terminated. This prevents diff --git a/sshfs.c b/sshfs.c index 81ee64a..739dbe3 100644 --- a/sshfs.c +++ b/sshfs.c @@ -1319,6 +1319,8 @@ static void *process_requests(void *data_) close_conn(); g_hash_table_foreach_remove(sshfs.reqtab, (GHRFunc) clean_req, NULL); sshfs.connver ++; + sshfs.outstanding_len = 0; + pthread_cond_broadcast(&sshfs.outstanding_cond); pthread_mutex_unlock(&sshfs.lock); if (!sshfs.reconnect) { -- cgit v1.2.3