linux/drivers/infiniband/hw
Douglas Miller 629e052d0c RDMA/hfi1: Prevent panic when SDMA is disabled
If the hfi1 module is loaded with HFI1_CAP_SDMA off, a call to
hfi1_write_iter() will dereference a NULL pointer and panic. A typical
stack frame is:

  sdma_select_user_engine [hfi1]
  hfi1_user_sdma_process_request [hfi1]
  hfi1_write_iter [hfi1]
  do_iter_readv_writev
  do_iter_write
  vfs_writev
  do_writev
  do_syscall_64

The fix is to test for SDMA in hfi1_write_iter() and fail the I/O with
EINVAL.

Link: https://lore.kernel.org/r/20220520183706.48973.79803.stgit@awfm-01.cornelisnetworks.com
Signed-off-by: Douglas Miller <doug.miller@cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2022-05-24 15:08:31 -03:00
..
bnxt_re RDMA: Split kernel-only global device caps from uverbs device caps 2022-04-06 15:02:13 -03:00
cxgb4 RDMA: Split kernel-only global device caps from uverbs device caps 2022-04-06 15:02:13 -03:00
efa RDMA/efa: Add support for dmabuf memory regions 2021-10-28 08:58:26 -03:00
hfi1 RDMA/hfi1: Prevent panic when SDMA is disabled 2022-05-24 15:08:31 -03:00
hns RDMA/hns: Use hr_reg_read() instead of remaining roce_get_xxx() 2022-05-12 14:16:28 -03:00
irdma Linux 5.18 2022-05-24 12:40:28 -03:00
mlx4 RDMA/mlx4: Avoid flush_scheduled_work() usage 2022-05-20 11:21:00 -03:00
mlx5 Linux 5.18 2022-05-24 12:40:28 -03:00
mthca RDMA/mthca: Delete useless module.h include 2022-01-28 13:03:12 -04:00
ocrdma RDMA: Split kernel-only global device caps from uverbs device caps 2022-04-06 15:02:13 -03:00
qedr RDMA/qedr: Remove unnecessary synchronize_irq() before free_irq() 2022-05-17 08:53:30 -03:00
qib IB/qib: Fix typo in comment 2022-05-24 11:24:57 -03:00
usnic RDMA/usnic: Refactor usnic_uiom_alloc_pd() 2022-04-08 14:20:20 -03:00
vmw_pvrdma RDMA/pvrdma: Remove useless DMA-32 fallback configuration 2022-01-28 10:49:04 -04:00
Makefile RDMA/irdma: Add irdma Kconfig/Makefile and remove i40iw 2021-06-02 20:06:36 -03:00