浏览代码

SUNRPC: Fix the return value of rpc_run_bc_task()

Currently rpc_run_bc_task() will return NULL if the task allocation failed.
However the only caller is bc_send, which assumes that the return value
will be an ERR_PTR.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Trond Myklebust 15 年之前
父节点
当前提交
ff0901f803
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      net/sunrpc/clnt.c

+ 1 - 0
net/sunrpc/clnt.c

@@ -659,6 +659,7 @@ struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req,
 	task = rpc_new_task(&task_setup_data);
 	task = rpc_new_task(&task_setup_data);
 	if (!task) {
 	if (!task) {
 		xprt_free_bc_request(req);
 		xprt_free_bc_request(req);
+		task = ERR_PTR(-ENOMEM);
 		goto out;
 		goto out;
 	}
 	}
 	task->tk_rqstp = req;
 	task->tk_rqstp = req;