nfsd: Fix cld_net->cn_tfm initialization
authorScott Mayhew <smayhew@redhat.com>
Tue, 12 Nov 2019 19:01:43 +0000 (14:01 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 12 Nov 2019 19:53:26 +0000 (14:53 -0500)
commit18b9a895e652979b70f9c20565394a69354dfebc
treebc677d5c2cae88f3e3206cfd84400537b9a20612
parentfb7dd0a1ba8690527c2394c6c55f909aa87d8f44
nfsd: Fix cld_net->cn_tfm initialization

Don't assign an error pointer to cld_net->cn_tfm, otherwise an oops will
occur in nfsd4_remove_cld_pipe().

Also, move the initialization of cld_net->cn_tfm so that it occurs after
the check to see if nfsdcld is running.  This is necessary because
nfsd4_client_tracking_init() looks for -ETIMEDOUT to determine whether
to use the "old" nfsdcld tracking ops.

Fixes: 6ee95d1c8991 ("nfsd: add support for upcall version 2")
Reported-by: Jamie Heilman <jamie@audible.transient.net>
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4recover.c