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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250407140242.GK395307@horms.kernel.org>
Date: Mon, 7 Apr 2025 15:02:42 +0100
From: Simon Horman <horms@...nel.org>
To: Xuanqiang Luo <xuanqiang.luo@...ux.dev>
Cc: przemyslaw.kitszel@...el.com, anthony.l.nguyen@...el.com,
	davem@...emloft.net, edumazet@...gle.com, netdev@...r.kernel.org,
	intel-wired-lan@...ts.osuosl.org,
	Xuanqiang Luo <luoxuanqiang@...inos.cn>
Subject: Re: [PATCH iwl-net v2] ice: Check VF VSI Pointer Value in
 ice_vc_add_fdir_fltr()

On Tue, Mar 25, 2025 at 10:01:49AM +0800, Xuanqiang Luo wrote:
> From: Xuanqiang Luo <luoxuanqiang@...inos.cn>
> 
> As mentioned in the commit baeb705fd6a7 ("ice: always check VF VSI
> pointer values"), we need to perform a null pointer check on the return
> value of ice_get_vf_vsi() before using it.
> 
> v2: Add "iwl-net" to the subject and modify the name format.
> 
> Fixes: 6ebbe97a4881 ("ice: Add a per-VF limit on number of FDIR filters")
> Signed-off-by: Xuanqiang Luo <luoxuanqiang@...inos.cn>

Reviewed-by: Simon Horman <horms@...nel.org>

> ---
>  drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
> index 14e3f0f89c78..53bad68e3f38 100644
> --- a/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
> +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
> @@ -2092,6 +2092,12 @@ int ice_vc_add_fdir_fltr(struct ice_vf *vf, u8 *msg)
>  	dev = ice_pf_to_dev(pf);
>  	vf_vsi = ice_get_vf_vsi(vf);
>  

nit, but not need to repost because of this: it's seems nicer
not to have not to have a blank line here. And instead, if one is
really wanted, put it above the ice_get_vf_vsi() line.

> +	if (!vf_vsi) {
> +		dev_err(dev, "Can not get FDIR vf_vsi for VF %u\n", vf->vf_id);
> +		v_ret = VIRTCHNL_STATUS_ERR_PARAM;
> +		goto err_exit;
> +	}
> +
>  #define ICE_VF_MAX_FDIR_FILTERS	128
>  	if (!ice_fdir_num_avail_fltr(&pf->hw, vf_vsi) ||
>  	    vf->fdir.fdir_fltr_cnt_total >= ICE_VF_MAX_FDIR_FILTERS) {
> -- 
> 2.27.0
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ