diff options
| author | Stefan Metzmacher <metze@samba.org> | 2021-02-17 11:00:53 +0100 |
|---|---|---|
| committer | Andreas Schneider <asn@samba.org> | 2021-03-15 08:04:58 +0100 |
| commit | 167009f6ac1186aeeabffc29368bd5b375d9861f (patch) | |
| tree | 4b6e67093b5fa6af7245583b578f6f89bf4d6627 /CompilerChecks.cmake | |
| parent | 2cf4c543d614e3263fa261e4584716d5b7771f09 (diff) | |
| download | socket_wrapper-167009f6ac1186aeeabffc29368bd5b375d9861f.tar.gz socket_wrapper-167009f6ac1186aeeabffc29368bd5b375d9861f.tar.xz socket_wrapper-167009f6ac1186aeeabffc29368bd5b375d9861f.zip | |
swrap: call libc_write() directly for internal fds
Otherwise we may deadlock with a backtrace like this:
swrap_accept():
...
SWRAP_LOCK_SI(si);
swrap_pcap_dump_packet() ->
write() ->
swrap_write() ->
SWRAP_LOCK_SI(si) -> abort()
This can happen if libc_open() called from swrap_pcap_get_fd()
return a stale fd. This may happen if glibc calls socket()
and closes it with __close_nocancel() instead of close().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14640
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'CompilerChecks.cmake')
0 files changed, 0 insertions, 0 deletions
