summaryrefslogtreecommitdiffstats
path: root/lib/libc/iconv/citrus_mapper.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2011-06-19 13:35:46 +0000
committerkan <kan@FreeBSD.org>2011-06-19 13:35:46 +0000
commit92d29093280cc14ccdb91f166332c07fc3b2370a (patch)
tree3bc323a0fd631c5d744d0899f650996dc54f0f73 /lib/libc/iconv/citrus_mapper.c
parent13e3e9fd0231fda3d7f7dec351a439b26fe94d34 (diff)
downloadFreeBSD-src-92d29093280cc14ccdb91f166332c07fc3b2370a.zip
FreeBSD-src-92d29093280cc14ccdb91f166332c07fc3b2370a.tar.gz
Put a quick bandaid on internal citrus locking.
The code is not quite right still, but it programs from deadlocking on themselves if one enables new citrus code by mistake.
Diffstat (limited to 'lib/libc/iconv/citrus_mapper.c')
-rw-r--r--lib/libc/iconv/citrus_mapper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/iconv/citrus_mapper.c b/lib/libc/iconv/citrus_mapper.c
index a788a9d9..b5ae96d 100644
--- a/lib/libc/iconv/citrus_mapper.c
+++ b/lib/libc/iconv/citrus_mapper.c
@@ -337,7 +337,9 @@ _citrus_mapper_open(struct _citrus_mapper_area *__restrict ma,
goto quit;
/* open mapper */
+ UNLOCK;
ret = mapper_open(ma, &cm, module, variable);
+ WLOCK;
if (ret)
goto quit;
cm->cm_key = strdup(mapname);
OpenPOWER on IntegriCloud