diff options
author | Anoop C S <anoopcs@redhat.com> | 2017-02-10 21:38:11 +0530 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2017-02-10 18:31:24 +0100 |
commit | 5af15532cefecb5665736f30e00960c17700d1b0 (patch) | |
tree | 16151fcfddba120c47569d39837e4851ee66ed83 /tests/CMakeLists.txt | |
parent | 888a62e2c81370ab32e9bc790f12419148bd8972 (diff) | |
download | socket_wrapper-5af15532cefecb5665736f30e00960c17700d1b0.tar.gz socket_wrapper-5af15532cefecb5665736f30e00960c17700d1b0.tar.xz socket_wrapper-5af15532cefecb5665736f30e00960c17700d1b0.zip |
Avoid mutex lock wait in socket close failure
In case of absence to close a socket fd during an exit from
application we try to close the same by traversing the
socket_fds in swrap_destructor. But the early lock taken on
libc_symbol_binding_mutex inside the destructor blocks the
subsequent request for locking the same while loading
libc_close within swrap_close.
Also added a test case to verify this flaw in destructor.
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9292b40..c2bd799 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -35,7 +35,8 @@ set(SWRAP_TESTS test_echo_udp_send_recv test_echo_udp_sendmsg_recvmsg test_swrap_unit - test_max_sockets) + test_max_sockets + test_close_failure) if (HAVE_STRUCT_MSGHDR_MSG_CONTROL) set(SWRAP_TESTS ${SWRAP_TESTS} test_sendmsg_recvmsg_fd) |