提交 7fec2bc9 编写于 作者: R Rui Miguel Silva 提交者: Greg Kroah-Hartman

staging: greybus: es2: fix arpc request size

Fix size field of arpc message request by using the header size and not
the pointer size.
Signed-off-by: NRui Miguel Silva <rmfrfs@gmail.com>
Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: NJohan Hovold <johan@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f9a21a3f
......@@ -1033,7 +1033,7 @@ static struct arpc *arpc_alloc(void *payload, u16 size, u8 type)
goto err_free_req;
rpc->req->type = type;
rpc->req->size = cpu_to_le16(sizeof(rpc->req) + size);
rpc->req->size = cpu_to_le16(sizeof(*rpc->req) + size);
memcpy(rpc->req->data, payload, size);
init_completion(&rpc->response_received);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册