]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Dec 2015 05:41:08 +0000 (21:41 -0800)
commit9a08c6f60bbc067199214b4730df27979716f242
tree9ca170cc4ee1ec68d156e431ac767024d6f46144
parent8489733094edbec8f3d62f96cd8b15402e66350a
nfs4: start callback_ident at idr 1

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>
fs/nfs/nfs4client.c