diff mbox

[RFC,Version,1,5/6] NFS add callback_ops to nfs4_proc_bind_conn_to_session_callback

Message ID 1454706518-4641-6-git-send-email-andros@netapp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andy Adamson Feb. 5, 2016, 9:08 p.m. UTC
From: Andy Adamson <andros@netapp.com>

Fix oops when NULL callback_ops pointer accessed in rpc_init_task

Signed-off-by: Andy Adamson <andros@netapp.com>
---
 fs/nfs/nfs4proc.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Trond Myklebust Feb. 6, 2016, 1:05 a.m. UTC | #1
On Fri, Feb 5, 2016 at 4:08 PM,  <andros@netapp.com> wrote:
> From: Andy Adamson <andros@netapp.com>
>
> Fix oops when NULL callback_ops pointer accessed in rpc_init_task
>
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
>  fs/nfs/nfs4proc.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index a2da473..ea07707 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -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,
>         };

Thanks! Applied to the series.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index a2da473..ea07707 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -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,
 	};