From: J. Bruce Fields Date: Mon, 5 May 2008 23:47:29 +0000 (-0400) Subject: nfsd: reorder printk in do_probe_callback to avoid use-after-free X-Git-Tag: v2.6.26-rc4~90^2~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=88dd0be3874566796fa4ffbdf927a53c4a6a2f4b;p=linux-2.6-omap-h63xx.git nfsd: reorder printk in do_probe_callback to avoid use-after-free We're currently dereferencing the client after we drop our reference count to it. Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 0b3ffa9840c..4d4760e687c 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -419,9 +419,9 @@ static int do_probe_callback(void *data) out_release_client: rpc_shutdown_client(client); out_err: - put_nfs4_client(clp); dprintk("NFSD: warning: no callback path to client %.*s\n", (int)clp->cl_name.len, clp->cl_name.data); + put_nfs4_client(clp); return status; }