mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 00:40:03 +00:00
IB/rdmavt: Insure QP vmalloc variants zero memory
The usage of the various vmalloc APIs do not consistently zero memory when allocating the swqe. Insure zeroing variants are used. Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
9565c6a37a
commit
654b643670
1 changed files with 4 additions and 4 deletions
|
@ -653,9 +653,9 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd,
|
|||
if (gfp == GFP_NOIO)
|
||||
swq = __vmalloc(
|
||||
(init_attr->cap.max_send_wr + 1) * sz,
|
||||
gfp, PAGE_KERNEL);
|
||||
gfp | __GFP_ZERO, PAGE_KERNEL);
|
||||
else
|
||||
swq = vmalloc_node(
|
||||
swq = vzalloc_node(
|
||||
(init_attr->cap.max_send_wr + 1) * sz,
|
||||
rdi->dparms.node);
|
||||
if (!swq)
|
||||
|
@ -704,9 +704,9 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd,
|
|||
qp->r_rq.wq = __vmalloc(
|
||||
sizeof(struct rvt_rwq) +
|
||||
qp->r_rq.size * sz,
|
||||
gfp, PAGE_KERNEL);
|
||||
gfp | __GFP_ZERO, PAGE_KERNEL);
|
||||
else
|
||||
qp->r_rq.wq = vmalloc_node(
|
||||
qp->r_rq.wq = vzalloc_node(
|
||||
sizeof(struct rvt_rwq) +
|
||||
qp->r_rq.size * sz,
|
||||
rdi->dparms.node);
|
||||
|
|
Loading…
Reference in a new issue