Commit 0b857b44 authored by Roland Dreier's avatar Roland Dreier Committed by Sagi Grimberg

nvme-rdma: Don't leak uninitialized memory in connect request private data

Zero out the full nvme_rdma_cm_req structure before sending it.
Otherwise we end up leaking kernel memory in the reserved field, which
might break forward compatibility in the future.
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
parent 07f00f06
...@@ -1269,7 +1269,7 @@ static int nvme_rdma_route_resolved(struct nvme_rdma_queue *queue) ...@@ -1269,7 +1269,7 @@ static int nvme_rdma_route_resolved(struct nvme_rdma_queue *queue)
{ {
struct nvme_rdma_ctrl *ctrl = queue->ctrl; struct nvme_rdma_ctrl *ctrl = queue->ctrl;
struct rdma_conn_param param = { }; struct rdma_conn_param param = { };
struct nvme_rdma_cm_req priv; struct nvme_rdma_cm_req priv = { };
int ret; int ret;
param.qp_num = queue->qp->qp_num; param.qp_num = queue->qp->qp_num;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment