linux_dsm_epyc7002/drivers/infiniband/hw/mthca
Leon Romanovsky 459cc69fa4 RDMA: Provide safe ib_alloc_device() function
All callers to ib_alloc_device() provide a larger size than struct
ib_device and rely on the fact that struct ib_device is embedded in their
driver specific structure as the first member.

Provide a safer variant of ib_alloc_device() that checks and enforces this
approach to make sure the drivers are using it right.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-01-30 15:52:30 -07:00
..
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mthca_allocator.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
mthca_av.c RDMA: Convert drivers to use the AH's sgid_attr in post_wr paths 2018-06-18 11:11:27 -06:00
mthca_catas.c treewide: setup_timer() -> timer_setup() (2 field) 2017-11-21 15:57:09 -08:00
mthca_cmd.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
mthca_cmd.h IB/core cleanup: Add const on args - device->process_mad 2015-06-02 09:33:13 -04:00
mthca_config_reg.h
mthca_cq.c IB: remove in-kernel support for memory windows 2015-12-23 14:29:04 -05:00
mthca_dev.h RDMA: Cleanup undesired pd->uobject usage 2018-12-18 19:15:48 -07:00
mthca_doorbell.h
mthca_eq.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
mthca_mad.c RDMA: Mark if destroy address handle is in a sleepable context 2018-12-19 16:28:03 -07:00
mthca_main.c RDMA: Provide safe ib_alloc_device() function 2019-01-30 15:52:30 -07:00
mthca_mcg.c
mthca_memfree.c cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
mthca_memfree.h
mthca_mr.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
mthca_pd.c
mthca_profile.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
mthca_profile.h
mthca_provider.c RDMA: Introduce and use rdma_device_to_ibdev() 2019-01-14 13:12:03 -07:00
mthca_provider.h
mthca_qp.c RDMA: Cleanup undesired pd->uobject usage 2018-12-18 19:15:48 -07:00
mthca_reset.c IB/mthca: Remove debug prints after allocation failure 2016-12-03 13:12:52 -05:00
mthca_srq.c RDMA: Cleanup undesired pd->uobject usage 2018-12-18 19:15:48 -07:00
mthca_uar.c
mthca_wqe.h