Date: Thu, 31 Aug 2023 16:07:43 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 212716] recv() with MSG_WAITALL doesn't always unblock on EOF Message-ID: <bug-212716-227-960OEQhzof@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-212716-227@https.bugs.freebsd.org/bugzilla/> References: <bug-212716-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212716 Mark Johnston <markj@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open CC| |markj@FreeBSD.org --- Comment #9 from Mark Johnston <markj@FreeBSD.org> --- (In reply to Greg Becker from comment #6) In addition, sbwait() should probably assert that SBS_CANTRECVMORE and SBS_CANTSENDMORE are not set for SO_RCV and SO_SND directions, respectively. Regarding the patch, the new check should happen in the "pr->pr_flags & PR_WANTRCVD" block, since that's where the sockbuf lock is dropped. Otherw= ise the existing check is effectively duplicated. The general behaviour of soreceive_generic() appears to be to consume data = as long as it's present, even in the face of SBS_CANTRECVMORE and socket error= s; see the "goto dontblock" statements near the beginning of the function.=20 soreceive_stream() similarly drains the receive buffer before handling termination. I'd argue for the same approach in the MSG_WAITALL loop. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-212716-227-960OEQhzof>