diff options
author | delphij <delphij@FreeBSD.org> | 2013-10-24 05:01:49 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2013-10-24 05:01:49 +0000 |
commit | be939ca962d3012cea3d32385af7527e0ce5c525 (patch) | |
tree | 4a003f4a60082d739b6b2714709819c6b259f186 | |
parent | 817f3323c4ae6c5685c1bde18aeac92153ab3fd5 (diff) | |
download | FreeBSD-src-be939ca962d3012cea3d32385af7527e0ce5c525.zip FreeBSD-src-be939ca962d3012cea3d32385af7527e0ce5c525.tar.gz |
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)
-rw-r--r-- | lib/libc/iconv/citrus_mapper.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/iconv/citrus_mapper.c b/lib/libc/iconv/citrus_mapper.c index b1ee8fb..43fa4b0 100644 --- a/lib/libc/iconv/citrus_mapper.c +++ b/lib/libc/iconv/citrus_mapper.c @@ -381,7 +381,9 @@ _citrus_mapper_close(struct _citrus_mapper *cm) _CITRUS_HASH_REMOVE(cm, cm_entry); free(cm->cm_key); } + UNLOCK(&cm_lock); mapper_close(cm); + return; quit: UNLOCK(&cm_lock); } |