| 0e4dc6af | 14-Dec-2021 |
Zhihong Wang <[email protected]> |
ring: fix overflow in memory size calculation
Parameters count and esize are both unsigned int, and their product can legaly exceed unsigned int and lead to runtime access violation.
Fixes: cc4b218
ring: fix overflow in memory size calculation
Parameters count and esize are both unsigned int, and their product can legaly exceed unsigned int and lead to runtime access violation.
Fixes: cc4b218790f6 ("ring: support configurable element size") Cc: [email protected]
Signed-off-by: Zhihong Wang <[email protected]> Reviewed-by: Liang Ma <[email protected]> Reviewed-by: Morten Brørup <[email protected]> Acked-by: Konstantin Ananyev <[email protected]>
show more ...
|
| 074717be | 10-Jan-2022 |
Yunjian Wang <[email protected]> |
ring: fix error code when creating ring
The error value returned by rte_ring_create_elem() should be positive integers. However, if the rte_ring_get_memsize_elem() function fails, a negative number
ring: fix error code when creating ring
The error value returned by rte_ring_create_elem() should be positive integers. However, if the rte_ring_get_memsize_elem() function fails, a negative number is returned and is directly used as the return value. As a result, this will cause the external call to check the return value to fail(like called by rte_mempool_create()).
Fixes: a182620042aa ("ring: get size in memory") Cc: [email protected]
Reported-by: Nan Zhou <[email protected]> Signed-off-by: Yunjian Wang <[email protected]> Acked-by: Konstantin Ananyev <[email protected]>
show more ...
|