[dpdk-dev] [PATCH v2] test: fix division by zero

Bruce Richardson bruce.richardson at intel.com
Thu May 13 10:23:00 CEST 2021


On Thu, May 13, 2021 at 09:10:37AM +0800, Min Hu (Connor) wrote:
> Variable i is used as a denominator which may be zero, and
> this may result in segmentation fault.
> 
> This patch fixed it.
> 
> Fixes: 948bc3d6d095 ("test: add reciprocal based division")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
> ---
> v2:
> * to skip the printouts if i == 0.
> ---
>  app/test/test_reciprocal_division_perf.c | 41 +++++++++++++++++++-------------
>  1 file changed, 24 insertions(+), 17 deletions(-)
> 
Acked-by: Bruce Richardson <bruce.richardson at intel.com>


More information about the dev mailing list