Files
linux/drivers
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/[email protected]
Signed-off-by: Douglas Miller <[email protected]>
Signed-off-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2022-05-24 15:08:31 -03:00
..
…
…
2022-04-06 08:47:52 -06:00
2022-04-08 12:59:43 -07:00
…
…
…
…
…
…
…
…
2022-04-27 20:36:47 +02:00
…
2022-04-24 17:25:10 +02:00
…
…
2022-05-18 13:58:13 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2022-05-18 12:31:31 -04:00
…
…
…
…