Skip to content

Commit

Permalink
nvme-rdma: Don't leak uninitialized memory in connect request private…
Browse files Browse the repository at this point in the history
… 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: Roland Dreier <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Sagi Grimberg <[email protected]>
  • Loading branch information
rolandd authored and sagigrimberg committed Aug 3, 2016
1 parent 07f00f0 commit 0b857b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/host/rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ static int nvme_rdma_route_resolved(struct nvme_rdma_queue *queue)
{
struct nvme_rdma_ctrl *ctrl = queue->ctrl;
struct rdma_conn_param param = { };
struct nvme_rdma_cm_req priv;
struct nvme_rdma_cm_req priv = { };
int ret;

param.qp_num = queue->qp->qp_num;
Expand Down

0 comments on commit 0b857b4

Please sign in to comment.