nfs4: fix discover_server_trunking use after free
authorWeston Andros Adamson <dros@primarydata.com>
Mon, 20 Jan 2014 03:45:36 +0000 (22:45 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Feb 2014 21:50:16 +0000 (13:50 -0800)
commitc39e05efd61f3159ab93d6f6abc55388ba680df7
treed0f5b42fda49501e55eaaf78e29ed36bcd9ecc87
parent1ec9b4651a4a5c2e50aafb4812dec2f7f0e65b0f
nfs4: fix discover_server_trunking use after free

commit abad2fa5ba67725a3f9c376c8cfe76fbe94a3041 upstream.

If clp is new (cl_count = 1) and it matches another client in
nfs4_discover_server_trunking, the nfs_put_client will free clp before
->cl_preserve_clid is set.

Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/nfs4client.c