在 2018/3/12 22:16, Leon Romanovsky 写道: > From: Leon Romanovsky <leonro@xxxxxxxxxxxx> > > Hi, > > The reason to this patchset is described in "RDMA/mlx4: Clear all > allocated memory by default" accommodated with relevant crash report. > Hi, leon I have noted your patchset and know the patch RDMA/mlx4: Clear all allocated memory by default how to test the crash on others? I want to know if all places need to use kzalloc instead of kmalloc and use kcalloc instead of kmalloc_array? thanks > The commit 00313983cda6 ("RDMA/nldev: provide detailed CM_ID information") > relies on the fact that object structures are zeroed at the allocation stage, > the mlx4 CQ wasn't allocated with kzalloc and it caused to the crash. > > So, I changed all places of such allocations, feel free to squash patches. > > Thanks > > Leon Romanovsky (15): > RDMA/mlx4: Clear all allocated memory by default > RDMA/mlx5: Zero all allocated memory > RDMA/rdmavt all allocated memory > RDMA/rxe: Zero all allocated memory > RDMA/hns: Zero all allocated memory > RDMA/bnxt_re: Zero all allocated memory > RDMA/cxgb3: Zero all allocated memory > RDMA/cxgb4: Zero all allocated memory > RDMA/hfi: Zero all allocated memory > RDMA/mthca: Zero all allocated memory > RDMA/nes: Zero all allocated memory > RDMA/ocrdma: Zero all allocated memory > RDMA/qib: Zero all allocated memory > RDMA/usnic: Zero all allocated memory > RDMA/vmw_pvrdma: Zero all allocated memory > > drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- > drivers/infiniband/hw/bnxt_re/qplib_res.c | 4 +-- > drivers/infiniband/hw/cxgb3/cxio_hal.c | 4 +-- > drivers/infiniband/hw/cxgb3/cxio_resource.c | 2 +- > drivers/infiniband/hw/cxgb3/iwch_provider.c | 10 +++---- > drivers/infiniband/hw/cxgb4/cq.c | 4 +-- > drivers/infiniband/hw/cxgb4/device.c | 12 ++++----- > drivers/infiniband/hw/cxgb4/id_table.c | 2 +- > drivers/infiniband/hw/cxgb4/provider.c | 4 +-- > drivers/infiniband/hw/cxgb4/qp.c | 10 +++---- > drivers/infiniband/hw/cxgb4/resource.c | 16 +++++------ > drivers/infiniband/hw/hfi1/chip.c | 6 ++--- > drivers/infiniband/hw/hfi1/debugfs.c | 8 +++--- > drivers/infiniband/hw/hfi1/efivar.c | 2 +- > drivers/infiniband/hw/hfi1/eprom.c | 6 ++--- > drivers/infiniband/hw/hfi1/mmu_rb.c | 2 +- > drivers/infiniband/hw/hfi1/pio.c | 3 +-- > drivers/infiniband/hw/hfi1/sdma.c | 11 +++----- > drivers/infiniband/hw/hfi1/verbs.c | 2 +- > drivers/infiniband/hw/hns/hns_roce_cmd.c | 7 +++-- > drivers/infiniband/hw/hns/hns_roce_hem.c | 4 +-- > drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 6 ++--- > drivers/infiniband/hw/hns/hns_roce_main.c | 2 +- > drivers/infiniband/hw/hns/hns_roce_mr.c | 6 ++--- > drivers/infiniband/hw/hns/hns_roce_pd.c | 2 +- > drivers/infiniband/hw/hns/hns_roce_qp.c | 6 ++--- > drivers/infiniband/hw/mlx4/alias_GUID.c | 2 +- > drivers/infiniband/hw/mlx4/cm.c | 2 +- > drivers/infiniband/hw/mlx4/cq.c | 6 ++--- > drivers/infiniband/hw/mlx4/doorbell.c | 2 +- > drivers/infiniband/hw/mlx4/mad.c | 8 +++--- > drivers/infiniband/hw/mlx4/main.c | 36 ++++++++++++------------- > drivers/infiniband/hw/mlx4/mcg.c | 2 +- > drivers/infiniband/hw/mlx4/mr.c | 4 +-- > drivers/infiniband/hw/mlx4/qp.c | 10 +++---- > drivers/infiniband/hw/mlx4/srq.c | 4 +-- > drivers/infiniband/hw/mlx5/cq.c | 2 +- > drivers/infiniband/hw/mlx5/doorbell.c | 2 +- > drivers/infiniband/hw/mlx5/mad.c | 18 ++++++------- > drivers/infiniband/hw/mlx5/main.c | 10 +++---- > drivers/infiniband/hw/mlx5/qp.c | 12 ++++----- > drivers/infiniband/hw/mlx5/srq.c | 4 +-- > drivers/infiniband/hw/mthca/mthca_allocator.c | 10 +++---- > drivers/infiniband/hw/mthca/mthca_av.c | 4 +-- > drivers/infiniband/hw/mthca/mthca_cmd.c | 4 +-- > drivers/infiniband/hw/mthca/mthca_eq.c | 4 +-- > drivers/infiniband/hw/mthca/mthca_mad.c | 2 +- > drivers/infiniband/hw/mthca/mthca_memfree.c | 12 ++++----- > drivers/infiniband/hw/mthca/mthca_mr.c | 4 +-- > drivers/infiniband/hw/mthca/mthca_provider.c | 32 +++++++++++----------- > drivers/infiniband/hw/mthca/mthca_qp.c | 2 +- > drivers/infiniband/hw/mthca/mthca_reset.c | 4 +-- > drivers/infiniband/hw/mthca/mthca_srq.c | 2 +- > drivers/infiniband/hw/nes/nes_mgt.c | 2 +- > drivers/infiniband/hw/nes/nes_nic.c | 2 +- > drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 2 +- > drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- > drivers/infiniband/hw/qib/qib_diag.c | 8 +++--- > drivers/infiniband/hw/qib/qib_file_ops.c | 4 +-- > drivers/infiniband/hw/qib/qib_fs.c | 6 ++--- > drivers/infiniband/hw/qib/qib_iba6120.c | 4 +-- > drivers/infiniband/hw/qib/qib_iba7220.c | 4 +-- > drivers/infiniband/hw/qib/qib_iba7322.c | 12 ++++----- > drivers/infiniband/hw/qib/qib_init.c | 8 +++--- > drivers/infiniband/hw/qib/qib_user_sdma.c | 20 +++++++------- > drivers/infiniband/hw/qib/qib_verbs.c | 2 +- > drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- > drivers/infiniband/hw/usnic/usnic_uiom.c | 4 +-- > drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +- > drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c | 2 +- > drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 4 +-- > drivers/infiniband/sw/rdmavt/ah.c | 2 +- > drivers/infiniband/sw/rdmavt/mcast.c | 2 +- > drivers/infiniband/sw/rdmavt/mmap.c | 2 +- > drivers/infiniband/sw/rdmavt/pd.c | 2 +- > drivers/infiniband/sw/rdmavt/qp.c | 2 +- > drivers/infiniband/sw/rdmavt/vt.c | 2 +- > drivers/infiniband/sw/rxe/rxe_mmap.c | 2 +- > drivers/infiniband/sw/rxe/rxe_mr.c | 4 +-- > drivers/infiniband/sw/rxe/rxe_pool.c | 2 +- > drivers/infiniband/sw/rxe/rxe_queue.c | 2 +- > 81 files changed, 226 insertions(+), 233 deletions(-) > > -- > 2.14.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > > . > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html