diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2018-04-05 04:58:13 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-04-05 18:11:37 +0200 |
commit | 57939021e8f882d13a5263a9d682c64ae00c578d (patch) | |
tree | 96e9c1061de3dc1db16b1ba107a3b3670257df07 /drivers/infiniband/hw/qedr | |
parent | IB/mlx5: Add ability to hash by IPSEC_SPI when creating a TIR (diff) | |
download | linux-57939021e8f882d13a5263a9d682c64ae00c578d.tar.xz linux-57939021e8f882d13a5263a9d682c64ae00c578d.zip |
RDMA/qedr: Zero stack memory before copying to user space
The fact this struct was not init'd like all the others was missed when
the padding reserved field was added.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 71e80a4781af ("RDMA/qedr: Fix uABI structure layouts for 32/64 compat")
Acked-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/qedr')
-rw-r--r-- | drivers/infiniband/hw/qedr/verbs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index a9f494fb892a..1835dc9eb3e3 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c @@ -473,9 +473,9 @@ struct ib_pd *qedr_alloc_pd(struct ib_device *ibdev, pd->pd_id = pd_id; if (udata && context) { - struct qedr_alloc_pd_uresp uresp; - - uresp.pd_id = pd_id; + struct qedr_alloc_pd_uresp uresp = { + .pd_id = pd_id, + }; rc = qedr_ib_copy_to_udata(udata, &uresp, sizeof(uresp)); if (rc) { |