svn commit: r256833 - head/lib/libc/iconv

Xin LI delphij at FreeBSD.org
Mon Oct 21 07:58:37 UTC 2013


Author: delphij
Date: Mon Oct 21 07:58:37 2013
New Revision: 256833
URL: http://svnweb.freebsd.org/changeset/base/256833

Log:
  Drop cm_lock before calling mapper_close, which in turn could call
  _citrus_mapper_close again and result in a deadlock otherwise.
  
  This is similar to NetBSD PR/24023 (fixed in their r1.5 of this file).
  
  PR:		bin/182994
  Submitted by:	Fabian Keil <fk fabiankeil de>
  MFC after:	3 days

Modified:
  head/lib/libc/iconv/citrus_mapper.c

Modified: head/lib/libc/iconv/citrus_mapper.c
==============================================================================
--- head/lib/libc/iconv/citrus_mapper.c	Mon Oct 21 07:49:36 2013	(r256832)
+++ head/lib/libc/iconv/citrus_mapper.c	Mon Oct 21 07:58:37 2013	(r256833)
@@ -381,7 +381,9 @@ _citrus_mapper_close(struct _citrus_mapp
 			_CITRUS_HASH_REMOVE(cm, cm_entry);
 			free(cm->cm_key);
 		}
+		UNLOCK(&cm_lock);
 		mapper_close(cm);
+		return;
 quit:
 		UNLOCK(&cm_lock);
 	}


More information about the svn-src-all mailing list