diff options
| author | Alexander Chesnokov <Alexander.Chesnokov@kaspersky.com> | 2026-04-13 12:14:43 +0300 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2026-05-18 04:58:41 -0400 |
| commit | a38e4410af9ad8b7ad2217254da06cd4dc21f0ed (patch) | |
| tree | 6a7979cae8e0bc8a37b59bb2034e83503415f68e /scripts/objdiff | |
| parent | 194762e6e436acde0f8f6aef44200b0058c36791 (diff) | |
RDMA/hns: Fix arithmetic overflow in calc_hem_config()
If bt_num is 3 or 2, then the expressions like
l0_idx * chunk_ba_num + l1_idx are computed in 32-bit
arithmetic before being assigned to a u64 index field,
which can lead to overflow.
Cast the first operand to u64 to ensure the arithmetic
is performed in 64-bit.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 2f49de21f3e9 ("RDMA/hns: Optimize mhop get flow for multi-hop addressing")
Signed-off-by: Alexander Chesnokov <Alexander.Chesnokov@kaspersky.com>
Link: https://patch.msgid.link/20260413091527.39990-1-Alexander.Chesnokov@kaspersky.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
