Explorar el Código

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 <bfields@citi.umich.edu>
J. Bruce Fields hace 17 años
padre
commit
88dd0be387
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      fs/nfsd/nfs4callback.c

+ 1 - 1
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;
 }