mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 05:33:09 +00:00
IB: Ensure that all rdma_ah_attr's are zero initialized
Since we are adding some new fields to this structure it is safest if all users reliably initialize the struct to zero. Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
This commit is contained in:
parent
0c271c433c
commit
fb51eecaa5
@ -1968,7 +1968,7 @@ static int modify_qp(struct ib_uverbs_file *file,
|
|||||||
struct ib_qp *qp;
|
struct ib_qp *qp;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
attr = kmalloc(sizeof *attr, GFP_KERNEL);
|
attr = kzalloc(sizeof(*attr), GFP_KERNEL);
|
||||||
if (!attr)
|
if (!attr)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
@ -2552,7 +2552,7 @@ ssize_t ib_uverbs_create_ah(struct ib_uverbs_file *file,
|
|||||||
struct ib_uobject *uobj;
|
struct ib_uobject *uobj;
|
||||||
struct ib_pd *pd;
|
struct ib_pd *pd;
|
||||||
struct ib_ah *ah;
|
struct ib_ah *ah;
|
||||||
struct rdma_ah_attr attr;
|
struct rdma_ah_attr attr = {};
|
||||||
int ret;
|
int ret;
|
||||||
struct ib_udata udata;
|
struct ib_udata udata;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user