The multiplication of two u32 integers may cause an overflow with large
mempool sizes.
Fixes:
74b46340e2d4 ("net/af_xdp: support shared UMEM")
Signed-off-by: Martin Weiser <martin.weiser@allegro-packets.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
umem->mb_pool = mb_pool;
base_addr = (void *)get_base_addr(mb_pool, &align);
- umem_size = mb_pool->populated_size * usr_config.frame_size +
+ umem_size = (uint64_t)mb_pool->populated_size *
+ (uint64_t)usr_config.frame_size +
align;
ret = xsk_umem__create(&umem->umem, base_addr, umem_size,