[PATCH v3 03/10] net/ice/base: fix integer overflow issue

Bruce Richardson bruce.richardson at intel.com
Tue May 27 19:06:34 CEST 2025


On Tue, May 27, 2025 at 01:17:22PM +0000, Dhanya Pillai wrote:
> From: Lukasz Krakowiak <lukaszx.krakowiak at intel.com>
> 
> Fix issue related to INTEGER_OVERFLOW.
> 
> Fixes: f636f2888cec ("net/ice/base: move and add some help function and macros")

Minor nit, that commit just moves the function about, but does not
introduce the code being fixed here. Instead it's older commit we need to
reference:

Fixes: aa1cd410fa64 ("net/ice/base: add flow module")


> Cc: stable at dpdk.org
> Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak at intel.com>
> Signed-off-by: Dhanya Pillai <dhanya.r.pillai at intel.com>
> ---
>  drivers/net/intel/ice/base/ice_type.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/intel/ice/base/ice_type.h b/drivers/net/intel/ice/base/ice_type.h
> index 297a5ea890..ae3b944d6e 100644
> --- a/drivers/net/intel/ice/base/ice_type.h
> +++ b/drivers/net/intel/ice/base/ice_type.h
> @@ -25,7 +25,7 @@
>   */
>  static inline bool ice_is_pow2(u64 val)
>  {
> -	return (val && !(val & (val - 1)));
> +	return val != 0 && (val & (val - 1)) == 0;
>  }
>  
>  /**
> -- 
> 2.43.0
> 


More information about the dev mailing list