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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <99a2d643-9004-41c8-8585-6c5c86fab599@web.de>
Date: Sat, 7 Sep 2024 14:40:10 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Gui-Dong Han <hanguidong02@...look.com>, netdev@...r.kernel.org,
 intel-wired-lan@...ts.osuosl.org, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>,
 Przemek Kitszel <przemyslaw.kitszel@...el.com>,
 Simon Horman <horms@...nel.org>, Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: stable@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
 Jia-Ju Bai <baijiaju1990@...il.com>
Subject: Re: [PATCH v2] ice: Fix improper handling of refcount in
 ice_sriov_set_msix_vec_count()

…
> +++ b/drivers/net/ethernet/intel/ice/ice_sriov.c
> @@ -1096,8 +1096,10 @@ int ice_sriov_set_msix_vec_count(struct pci_dev *vf_dev, int msix_vec_count)
>  		return -ENOENT;
>
>  	vsi = ice_get_vf_vsi(vf);
> -	if (!vsi)
> +	if (!vsi) {
> +		ice_put_vf(vf);
>  		return -ENOENT;
> +	}
>
>  	prev_msix = vf->num_msix;
>  	prev_queues = vf->num_vf_qs;
> @@ -1142,8 +1144,10 @@ int ice_sriov_set_msix_vec_count(struct pci_dev *vf_dev, int msix_vec_count)
>  	vf->num_msix = prev_msix;
>  	vf->num_vf_qs = prev_queues;
>  	vf->first_vector_idx = ice_sriov_get_irqs(pf, vf->num_msix);
> -	if (vf->first_vector_idx < 0)
> +	if (vf->first_vector_idx < 0) {
> +		ice_put_vf(vf);
>  		return -EINVAL;
> +	}
>
>  	if (needs_rebuild) {
>  		ice_vf_reconfig_vsi(vf);

Would you like to collaborate with any goto chains according to
the desired completion of exception handling?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ