NFSv4: Fix EXCHANGE_ID corrupt verifier issue
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 1 Aug 2017 20:02:47 +0000 (16:02 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2017 15:49:28 +0000 (08:49 -0700)
commitf7d3e54fb40cfc6f829b8f8ad3aab026714f2ffc
treef82f5275203cf3a98c6ba25a774ceb46b6e3b266
parentf5214eb4baf87b0134acf98c29150071fa3b815c
NFSv4: Fix EXCHANGE_ID corrupt verifier issue

commit fd40559c8657418385e42f797e0b04bfc0add748 upstream.

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")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/nfs4proc.c
fs/nfs/nfs4xdr.c
include/linux/nfs_xdr.h