FreeBSD Bugzilla – Attachment 244510 Details for
Bug 212716
recv() with MSG_WAITALL doesn't always unblock on EOF
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
echeck socket receive buffer for errors after dropping then regaining the lock in soreceive_generic().
patch (text/plain), 890 bytes, created by
Greg Becker
on 2023-08-30 22:36:51 UTC
(
hide
)
Description:
echeck socket receive buffer for errors after dropping then regaining the lock in soreceive_generic().
Filename:
MIME Type:
Creator:
Greg Becker
Created:
2023-08-30 22:36:51 UTC
Size:
890 bytes
patch
obsolete
>From 89f401f41e0f938c5f007cecc43f9a9f2caeb9e0 Mon Sep 17 00:00:00 2001 >From: Greg Becker <becker.greg@att.net> >Date: Wed, 30 Aug 2023 17:21:48 -0500 >Subject: Recheck socket receive buffer for errors after dropping then > regaining the lock in soreceive_generic(). > >--- > sys/kern/uipc_socket.c | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c >index ffd5e06c34b7..1ab9cc550d28 100644 >--- a/sys/kern/uipc_socket.c >+++ b/sys/kern/uipc_socket.c >@@ -2437,6 +2437,10 @@ soreceive_generic(struct socket *so, struct sockaddr **psa, struct uio *uio, > * the protocol. Skip blocking in this case. > */ > if (so->so_rcv.sb_mb == NULL) { >+ if (so->so_error || so->so_rerror || >+ so->so_rcv.sb_state & SBS_CANTRCVMORE) >+ break; >+ > error = sbwait(so, SO_RCV); > if (error) { > SOCKBUF_UNLOCK(&so->so_rcv); >-- >2.41.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 212716
:
244510
|
244523
|
244533
|
244557
|
244732