]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: liquidio: fix overflow in octeon_init_instr_queue()
authorAlexey Nepomnyashih <sdl@nppct.ru>
Wed, 17 Sep 2025 15:30:58 +0000 (15:30 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Sep 2025 09:16:45 +0000 (11:16 +0200)
commit45f71f4ac4aac5ad78a5957b7408afa9a784715f
tree2e32313771ffefc913c871c5648e695adfac71eb
parent6e1675c8b612d566bfe2a6db568e3659224c0983
net: liquidio: fix overflow in octeon_init_instr_queue()

[ Upstream commit cca7b1cfd7b8a0eff2a3510c5e0f10efe8fa3758 ]

The expression `(conf->instr_type == 64) << iq_no` can overflow because
`iq_no` may be as high as 64 (`CN23XX_MAX_RINGS_PER_PF`). Casting the
operand to `u64` ensures correct 64-bit arithmetic.

Fixes: f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters")
Signed-off-by: Alexey Nepomnyashih <sdl@nppct.ru>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/cavium/liquidio/request_manager.c