linux/drivers/infiniband/hw
Yury Norov [NVIDIA] 9b05e91afe RDMA: hfi1: fix possible divide-by-zero in find_hw_thread_mask()
[ Upstream commit 59f7d21385 ]

The function divides number of online CPUs by num_core_siblings, and
later checks the divider by zero. This implies a possibility to get
and divide-by-zero runtime error. Fix it by moving the check prior to
division. This also helps to save one indentation level.

Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
Link: https://patch.msgid.link/20250604193947.11834-3-yury.norov@gmail.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-08-20 18:30:43 +02:00
..
bnxt_re RDMA/bnxt_re: Fix size of uverbs_copy_to() in BNXT_RE_METHOD_GET_TOGGLE_MEM 2025-08-20 18:30:42 +02:00
cxgb4 RDMA/cxgb4: Notify rdma stack for IB_EVENT_QP_LAST_WQE_REACHED event 2025-02-08 09:57:51 +01:00
efa RDMA/efa: Reset device on probe failure 2025-02-21 14:01:22 +01:00
erdma Fix dma_unmap_sg() nents value 2025-08-15 12:13:51 +02:00
hfi1 RDMA: hfi1: fix possible divide-by-zero in find_hw_thread_mask() 2025-08-20 18:30:43 +02:00
hns RDMA/hns: Fix -Wframe-larger-than issue 2025-08-15 12:13:53 +02:00
irdma RDMA/irdma: Fix misspelling of "accept*" 2024-10-11 14:06:09 -03:00
mana RDMA/mana_ib: Fix DSCP value in modify QP 2025-08-15 12:13:54 +02:00
mlx4 RDMA/mlx4: Avoid false error about access to uninitialized gids array 2025-02-08 09:57:37 +01:00
mlx5 RDMA/mlx5: Fix UMR modifying of mkey page size 2025-08-15 12:13:43 +02:00
mthca RDMA: Pass entire uverbs attr bundle to create cq function 2024-06-27 16:28:21 -03:00
ocrdma RDMA/ocrdma: Don't inline statistics functions 2024-07-11 13:25:11 +03:00
qedr RDMA: Pass entire uverbs attr bundle to create cq function 2024-06-27 16:28:21 -03:00
qib qibfs: fix _another_ leak 2025-05-02 07:59:20 +02:00
usnic RDMA/usnic: Fix passing zero to PTR_ERR in usnic_ib_pci_probe() 2025-04-25 10:47:39 +02:00
vmw_pvrdma RDMA: Pass entire uverbs attr bundle to create cq function 2024-06-27 16:28:21 -03:00
Makefile RDMA/hns: Clean up the legacy CONFIG_INFINIBAND_HNS 2025-02-08 09:57:46 +01:00