Commit 57939021 authored by Jason Gunthorpe's avatar Jason Gunthorpe

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: 71e80a47 ("RDMA/qedr: Fix uABI structure layouts for 32/64 compat")
Acked-by: default avatarMichal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 2d93fc85
......@@ -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) {
......
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