Fix handling of errors from sblock() in soreceive_stream().
Previously we would attempt to unlock the socket buffer despite having failed to lock it. Simply return an error instead: no resources need to be released at this point, and doing so is consistent with soreceive_generic(). PR: 238789 Submitted by: Greg Becker <greg@codeconcepts.com> MFC after: 1 week
This commit is contained in:
parent
73155b4327
commit
6d958292f3
@ -2200,7 +2200,7 @@ soreceive_stream(struct socket *so, struct sockaddr **psa, struct uio *uio,
|
||||
/* Prevent other readers from entering the socket. */
|
||||
error = sblock(sb, SBLOCKWAIT(flags));
|
||||
if (error)
|
||||
goto out;
|
||||
return (error);
|
||||
SOCKBUF_LOCK(sb);
|
||||
|
||||
/* Easy one, no space to copyout anything. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user