SUNRPC: Don't receive TCP data into a request buffer that has been reset
authorTrond Myklebust <trondmy@gmail.com>
Thu, 12 Sep 2019 12:04:25 +0000 (08:04 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 17 Sep 2019 19:14:11 +0000 (15:14 -0400)
commit45835a63d039fc3bfb1d6c72cedaf785cd920e4a
treebe8f5a4aef9c6f1e775e3a3676d0b29de47b2dc5
parentcc204d01262a69218b2d0db5cdea371de85871d9
SUNRPC: Don't receive TCP data into a request buffer that has been reset

If we've removed the request from the receive list, and have added
it back after resetting the request receive buffer, then we should
only receive message data if it is a new reply (i.e. if
transport->recv.copied is zero).

Fixes: 277e4ab7d530b ("SUNRPC: Simplify TCP receive code by switching...")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtsock.c