Date: Sun, 29 May 2011 18:00:50 +0000 (UTC) From: Mikolaj Golub <trociny@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/kern uipc_socket.c Message-ID: <201105291801.p4TI19YS017990@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
trociny 2011-05-29 18:00:50 UTC
FreeBSD src repository
Modified files:
sys/kern uipc_socket.c
Log:
SVN rev 222454 on 2011-05-29 18:00:50Z by trociny
In soreceive_generic(), if MSG_WAITALL is set but the request is
larger than the receive buffer, we have to receive in sections.
When notifying the protocol that some data has been drained the
lock is released for a moment. Returning we block waiting for the
rest of data. There is a race, when data could arrive while the
lock was released and then the connection stalls in sbwait.
Fix this by checking for data before blocking and skip blocking
if there are some.
PR: kern/154504
Reported by: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
Tested by: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
Reviewed by: rwatson
Approved by: kib (co-mentor)
MFC after: 2 weeks
Revision Changes Path
1.355 +10 -4 src/sys/kern/uipc_socket.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105291801.p4TI19YS017990>
