Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/mlx5: fix overflow in mempool argument
The mlx5_mprq_alloc_mp function makes shifting to the numeric constant 1, for sending it as a parameter to rte_mempool_create function. The rte_mempool_create function expects to get void pointer (uintptr_t, might be 64-bit) and instead gets a 32-bit variable, because the numeric constant size is a 32-bit. In case the shift is greater than 32 the variable might lose its value even though the function might get 64-bit argument. Change the size of the numeric constant 1 to uintptr_t. Fixes: 3a22f38 ("net/mlx5: replace external mbuf shared memory") Cc: [email protected] Signed-off-by: Michael Baum <[email protected]> Acked-by: Matan Azrad <[email protected]>
- Loading branch information