dovecot-2.2: lib-index: Fixed assert-crash in some cache locking...

dovecot at dovecot.org dovecot at dovecot.org
Tue Oct 7 17:28:45 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/51233ae4af26
changeset: 17907:51233ae4af26
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Oct 07 20:13:36 2014 +0300
description:
lib-index: Fixed assert-crash in some cache locking race conditions.
If mail_index_map() is being called, we can't refresh the index or it'll
crash. It wouldn't help anyway, since the index was just refreshed.

diffstat:

 src/lib-index/mail-cache.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 66842b55d2de -r 51233ae4af26 src/lib-index/mail-cache.c
--- a/src/lib-index/mail-cache.c	Tue Oct 07 19:48:34 2014 +0300
+++ b/src/lib-index/mail-cache.c	Tue Oct 07 20:13:36 2014 +0300
@@ -659,7 +659,7 @@
 			break;
 		/* mismatch. try refreshing index once. if that doesn't help,
 		   we can't use the cache. */
-		if (i > 0) {
+		if (i > 0 || cache->index->mapping) {
 			mail_cache_unlock_file(cache);
 			return 0;
 		}


More information about the dovecot-cvs mailing list