]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nfs4: start callback_ident at idr 1
authorBenjamin Coddington <bcodding@redhat.com>
Fri, 20 Nov 2015 14:56:20 +0000 (09:56 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 5 Feb 2016 03:33:22 +0000 (19:33 -0800)
commit429ef663c1ec2f81487a760dd9e12b764deb1d0a
tree2616e292f046ffb51934bb0337a815658167bd0e
parentccda88632ab547edcb34aa37fed6bf0d38e03d66
nfs4: start callback_ident at idr 1

Orabug: 22623874

commit c68a027c05709330fe5b2f50c50d5fa02124b5d8 upstream.

If clp->cl_cb_ident is zero, then nfs_cb_idr_remove_locked() skips removing
it when the nfs_client is freed.  A decoding or server bug can then find
and try to put that first nfs_client which would lead to a crash.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Fixes: d6870312659d ("nfs4client: convert to idr_alloc()")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 254cbeb139be712a9dbcfcaea997a3e3dfd9be52)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
fs/nfs/nfs4client.c