Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2013 05:01:49 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r257039 - stable/10/lib/libc/iconv
Message-ID:  <201310240501.r9O51nu7011292@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Thu Oct 24 05:01:49 2013
New Revision: 257039
URL: http://svnweb.freebsd.org/changeset/base/257039

Log:
  MFC r256833:
  
  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>
  Approved by:	re (hrs)

Modified:
  stable/10/lib/libc/iconv/citrus_mapper.c
Directory Properties:
  stable/10/lib/libc/   (props changed)

Modified: stable/10/lib/libc/iconv/citrus_mapper.c
==============================================================================
--- stable/10/lib/libc/iconv/citrus_mapper.c	Thu Oct 24 03:36:39 2013	(r257038)
+++ stable/10/lib/libc/iconv/citrus_mapper.c	Thu Oct 24 05:01:49 2013	(r257039)
@@ -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);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310240501.r9O51nu7011292>