lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <56f850d0-efbe-462d-9034-d1c11453cff2@gmail.com>
Date: Sun, 25 Jan 2026 08:46:23 +0200
From: Tariq Toukan <ttoukan.linux@...il.com>
To: Zeng Chi <zeng_chi911@....com>, saeedm@...dia.com, leon@...nel.org,
 tariqt@...dia.com, mbloch@...dia.com, davem@...emloft.net,
 andrew+netdev@...n.ch, edumazet@...gle.com, kuba@...nel.org,
 pabeni@...hat.com, feliu@...dia.com, parav@...dia.com, witu@...dia.com,
 ajayachandra@...dia.com
Cc: netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
 linux-kernel@...r.kernel.org, Zeng Chi <zengchi@...inos.cn>
Subject: Re: [PATCH v3 net] net/mlx5: Fix return type mismatch in
 mlx5_esw_vport_vhca_id()



On 23/01/2026 10:57, Zeng Chi wrote:
> From: Zeng Chi <zengchi@...inos.cn>
> 
> The function mlx5_esw_vport_vhca_id() is declared to return bool,
> but returns -EOPNOTSUPP (-45), which is an int error code. This
> causes a signedness bug as reported by smatch.
> 
> This patch fixes this smatch report:
> drivers/net/ethernet/mellanox/mlx5/core/eswitch.h:981 mlx5_esw_vport_vhca_id()
> warn: signedness bug returning '(-45)'
> 
> Fixes: 1baf30426553 ("net/mlx5: E-Switch, Set/Query hca cap via vhca id")
> Reviewed-by: Parav Pandit <parav@...dia.com>
> Signed-off-by: Zeng Chi <zengchi@...inos.cn>
> ---
> v2 -> v3:
> - Shortened the commit ID in the `Fixes:` tag to 12 characters as suggested.
> - Added a `Reviewed-by:` tag from Parav Pandit <parav@...dia.com>.
> 
> v2:Added the required Fixes tag and specified target branch net in subject prefix
> ---
>   drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
> index ad1073f7b79f..e7fe43799b23 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
> @@ -1009,7 +1009,7 @@ mlx5_esw_host_functions_enabled(const struct mlx5_core_dev *dev)
>   static inline bool
>   mlx5_esw_vport_vhca_id(struct mlx5_eswitch *esw, u16 vportn, u16 *vhca_id)
>   {
> -	return -EOPNOTSUPP;
> +	return false;
>   }
>   
>   #endif /* CONFIG_MLX5_ESWITCH */

Reviewed-by: Tariq Toukan <tariqt@...dia.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ