summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/rdma.c
diff options
context:
space:
mode:
authorRoland Dreier2016-07-31 09:27:39 +0200
committerSagi Grimberg2016-08-03 15:24:57 +0200
commit0b857b44b5e445dc850cd91c45ce6edeb7797480 (patch)
treefac52459f64f5b1191869fcb070c9187fe1cbc21 /drivers/nvme/host/rdma.c
parentMerge tag 'mmc-v4.8' of git://git.linaro.org/people/ulf.hansson/mmc (diff)
downloadkernel-qcow2-linux-0b857b44b5e445dc850cd91c45ce6edeb7797480.tar.gz
kernel-qcow2-linux-0b857b44b5e445dc850cd91c45ce6edeb7797480.tar.xz
kernel-qcow2-linux-0b857b44b5e445dc850cd91c45ce6edeb7797480.zip
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: Roland Dreier <roland@purestorage.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Diffstat (limited to 'drivers/nvme/host/rdma.c')
-rw-r--r--drivers/nvme/host/rdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 3e3ce2b0424e..b96b88369871 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -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;