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)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 20 Jan 2014 23:08:06 +0000 (16:08 -0700)
commitabad2fa5ba67725a3f9c376c8cfe76fbe94a3041
tree22bfdee1c9f9a7cc5b11ca9398b28fc10e73ca0d
parent64590daa9e0dfb3aad89e3ab9230683b76211d5b
nfs4: fix discover_server_trunking use after free

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.

Cc: stable@vger.kernel.org # 3.7+
Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4client.c