]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r368326: kern: soclose: don't sleep on SO_LINGER w/ timeout=0
authorKyle Evans <kevans@FreeBSD.org>
Tue, 15 Dec 2020 21:54:31 +0000 (21:54 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Tue, 15 Dec 2020 21:54:31 +0000 (21:54 +0000)
commit3f3bc560b30289cb146161120d4d128238410c77
treebf4ecae6a1c37127097a317bb1a672ed435d0050
parentca8c198afa5450fe25e6e9ab56fa195d74953baa
MFC r368326: kern: soclose: don't sleep on SO_LINGER w/ timeout=0

This is a valid scenario that's handled in the various protocol layers where
it makes sense (e.g., tcp_disconnect and sctp_disconnect). Given that it
indicates we should immediately drop the connection, it makes little sense
to sleep on it.

This could lead to panics with INVARIANTS. On non-INVARIANTS kernels, this
could result in the thread hanging until a signal interrupts it if the
protocol does not mark the socket as disconnected for whatever reason.
sys/kern/uipc_socket.c