NFSv4: Fix EXCHANGE_ID corrupt verifier issue
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 1 Aug 2017 20:02:47 +0000 (16:02 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 1 Aug 2017 20:28:55 +0000 (16:28 -0400)
commitfd40559c8657418385e42f797e0b04bfc0add748
tree2e90e12a96fc87b33c34be6082bf42be81322154
parentb7dbcc0e433f0f61acb89ed9861ec996be4f2b38
NFSv4: Fix EXCHANGE_ID corrupt verifier issue

The verifier is allocated on the stack, but the EXCHANGE_ID RPC call was
changed to be asynchronous by commit 8d89bd70bc939. If we interrrupt
the call to rpc_wait_for_completion_task(), we can therefore end up
transmitting random stack contents in lieu of the verifier.

Fixes: 8d89bd70bc939 ("NFS setup async exchange_id")
Cc: stable@vger.kernel.org # v4.9+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c
fs/nfs/nfs4xdr.c
include/linux/nfs_xdr.h