aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDouglas Miller <doug.miller@cornelisnetworks.com>2022-05-20 14:37:06 -0400
committerJason Gunthorpe <jgg@nvidia.com>2022-05-24 15:08:31 -0300
commit629e052d0c98e46dde9f0824f0aa437f678d9b8f (patch)
tree016ccefe56e365dbd50c652f4bd53ae5831d89f3 /sound
parentRDMA/hfi1: Prevent use of lock before it is initialized (diff)
downloadlinux-dev-629e052d0c98e46dde9f0824f0aa437f678d9b8f.tar.xz
linux-dev-629e052d0c98e46dde9f0824f0aa437f678d9b8f.zip
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>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions