RFR 8006395: Race in async socket close on Linux

Alan Bateman Alan.Bateman at oracle.com
Thu Jan 31 06:34:51 PST 2013


On 30/01/2013 21:36, Chris Hegarty wrote:
> There is a very small, and very old, window for a race in the socket 
> asynchronous close mechanism on Linux. This can lead to blocking 
> socket operations never returning even after the socket has been closed.
>
> This issue would appear to exist since its (linux_close.c) creation 
> back in 1.4, but since the window for the race is tiny, it seems to 
> have gone unnoticed until now.
I think at the time that close would block if there was another thread 
doing I/O so this may be why the signal was queued first.

The proposed change looks good to me.

-Alan



More information about the net-dev mailing list