]> git.hungrycats.org Git - linux/commitdiff
NFSD: Using free_conn free connection
authorKinglong Mee <kinglongmee@gmail.com>
Mon, 24 Mar 2014 03:56:59 +0000 (11:56 +0800)
committerJiri Slaby <jslaby@suse.cz>
Thu, 6 Oct 2016 06:22:03 +0000 (08:22 +0200)
commit 3f42d2c428c724212c5f4249daea97e254eb0546 upstream.

Connection from alloc_conn must be freed through free_conn,
otherwise, the reference of svc_xprt will never be put.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/nfsd/nfs4state.c

index 0a138e4fc2e09af3978a9701fc610ab503a3bcea..689595b03659b58005dae5123d4b9b2468940bd5 100644 (file)
@@ -2270,7 +2270,8 @@ out:
        if (!list_empty(&clp->cl_revoked))
                seq->status_flags |= SEQ4_STATUS_RECALLABLE_STATE_REVOKED;
 out_no_session:
-       kfree(conn);
+       if (conn)
+               free_conn(conn);
        spin_unlock(&nn->client_lock);
        return status;
 out_put_session: