On Mon, Oct 31, 2022 at 08:56:48AM -0500, Eric Blake wrote:
> On Thu, Oct 27, 2022 at 09:49:52AM +0100, Richard W.M. Jones wrote:
> > On Wed, Oct 26, 2022 at 05:18:00PM -0500, Eric Blake wrote:
> > > - if (conn->sockin >= 0)
> > > -closesocket (conn->sockin);
> > > - if (conn->sockout >= 0
On Thu, Oct 27, 2022 at 09:49:52AM +0100, Richard W.M. Jones wrote:
> On Wed, Oct 26, 2022 at 05:18:00PM -0500, Eric Blake wrote:
> > - if (conn->sockin >= 0)
> > -closesocket (conn->sockin);
> > - if (conn->sockout >= 0 && conn->sockin != conn->sockout)
> > -closesocket (conn->sockout);
On Wed, Oct 26, 2022 at 05:18:00PM -0500, Eric Blake wrote:
> - if (conn->sockin >= 0)
> -closesocket (conn->sockin);
> - if (conn->sockout >= 0 && conn->sockin != conn->sockout)
> -closesocket (conn->sockout);
> + if (conn->sockout >= 0 && how == SHUT_WR) {
> +if (conn->sockin ==
If we detect a fatal error but do not close the socket back to the
client, then we can create deadlock where we are stuck waiting to read
NBD_CMD_DISC from the client but where the client is stuck waiting to
read our reply. Try harder to explicitly inform the client any time
that we have detected