NFSv3: fix rpc receive buffer size for MOUNT call
authorOlga Kornievskaia <olga.kornievskaia@gmail.com>
Thu, 14 May 2020 20:09:40 +0000 (16:09 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 May 2020 06:20:27 +0000 (08:20 +0200)
commitd4e58131829f90161c381205ab1ff6bd94747b03
treee42548bbc404a998e09168c3e23886979cd637ec
parente26e2a3febcb7ad7a93c75314591aef2101d7e47
NFSv3: fix rpc receive buffer size for MOUNT call

[ Upstream commit 8eed292bc8cbf737e46fb1c119d4c8f6dcb00650 ]

Prior to commit e3d3ab64dd66 ("SUNRPC: Use au_rslack when
computing reply buffer size"), there was enough slack in the reply
buffer to commodate filehandles of size 60bytes. However, the real
problem was that the reply buffer size for the MOUNT operation was
not correctly calculated. Received buffer size used the filehandle
size for NFSv2 (32bytes) which is much smaller than the allowed
filehandle size for the v3 mounts.

Fix the reply buffer size (decode arguments size) for the MNT command.

Fixes: 2c94b8eca1a2 ("SUNRPC: Use au_rslack when computing reply buffer size")
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/mount_clnt.c