Skip to content
Commit f06f00a2 authored by J. Bruce Fields's avatar J. Bruce Fields
Browse files

svcrpc: sends on closed socket should stop immediately



svc_tcp_sendto sets XPT_CLOSE if we fail to transmit the entire reply.
However, the XPT_CLOSE won't be acted on immediately.  Meanwhile other
threads could send further replies before the socket is really shut
down.  This can manifest as data corruption: for example, if a truncated
read reply is followed by another rpc reply, that second reply will look
to the client like further read data.

Symptoms were data corruption preceded by svc_tcp_sendto logging
something like

	kernel: rpc-srv/tcp: nfsd: sent only 963696 when sending 1048708 bytes - shutting down socket

Cc: stable@vger.kernel.org
Reported-by: default avatarMalahal Naineni <malahal@us.ibm.com>
Tested-by: default avatarMalahal Naineni <malahal@us.ibm.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent be1e4444
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment