Date: Wed, 15 Jun 2011 20:34:40 +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: <201106152034.p5FKYrtA049070@repoman.freebsd.org>
index | next in thread | raw e-mail
trociny 2011-06-15 20:34:40 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_8)
sys/kern uipc_socket.c
Log:
SVN rev 223119 on 2011-06-15 20:34:40Z by trociny
MFC r222454:
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: pjd (mentor)
Revision Changes Path
1.340.2.9 +10 -4 src/sys/kern/uipc_socket.c
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106152034.p5FKYrtA049070>
