]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
NFS add callback_ops to nfs4_proc_bind_conn_to_session_callback
authorAndy Adamson <andros@netapp.com>
Fri, 5 Feb 2016 21:08:37 +0000 (16:08 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Sat, 6 Feb 2016 01:13:53 +0000 (20:13 -0500)
Fix oops when NULL callback_ops pointer accessed in rpc_init_task

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4proc.c

index 36471e013a738ea89da25054f5791e75b6a51b97..dbc3dc2f65cd19396f37be4c0c919e752f8758b9 100644 (file)
@@ -6782,6 +6782,15 @@ nfs41_same_server_scope(struct nfs41_server_scope *a,
        return false;
 }
 
+static void
+nfs4_bind_one_conn_to_session_done(struct rpc_task *task, void *calldata)
+{
+}
+
+static const struct rpc_call_ops nfs4_bind_one_conn_to_session_ops = {
+       .rpc_call_done =  &nfs4_bind_one_conn_to_session_done,
+};
+
 /*
  * nfs4_proc_bind_one_conn_to_session()
  *
@@ -6810,6 +6819,7 @@ int nfs4_proc_bind_one_conn_to_session(struct rpc_clnt *clnt,
        struct rpc_task_setup task_setup_data = {
                .rpc_client = clnt,
                .rpc_xprt = xprt,
+               .callback_ops = &nfs4_bind_one_conn_to_session_ops,
                .rpc_message = &msg,
                .flags = RPC_TASK_TIMEOUT,
        };