]> asedeno.scripts.mit.edu Git - linux.git/commit
mlx4_ib: zero out struct ib_pd when allocating
authorSteve Wise <swise@opengridcomputing.com>
Thu, 1 Mar 2018 21:58:20 +0000 (13:58 -0800)
committerDoug Ledford <dledford@redhat.com>
Thu, 8 Mar 2018 20:03:03 +0000 (15:03 -0500)
commit5292443431fff5ba20f1b48985d382dd824016eb
tree246240e9f38cd50baac9eb22b342e4e75c12b11f
parentfccec5b89ac61ebe2f353feecd08a16621f2418b
mlx4_ib: zero out struct ib_pd when allocating

Zero out the fields of the struct ib_pd for user mode pds so that
users querying pds via nldev will not get garbage.  For simplicity,
use kzalloc() to allocate the mlx4_ib_pd struct.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx4/main.c