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: <aO_Iv3FshxBPkmjs@horms.kernel.org>
Date: Wed, 15 Oct 2025 17:15:59 +0100
From: Simon Horman <horms@...nel.org>
To: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
Cc: Sunil Goutham <sgoutham@...vell.com>,
	Linu Cherian <lcherian@...vell.com>,
	Geetha sowjanya <gakula@...vell.com>,
	Jerin Jacob <jerinj@...vell.com>, hariprasad <hkelam@...vell.com>,
	Subbaraya Sundeep <sbhatta@...vell.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Nithya Mani <nmani@...vell.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, dan.carpenter@...aro.org,
	kernel-janitors@...r.kernel.org, error27@...il.com
Subject: Re: [PATCH v2] Octeontx2-af: Fix pci_alloc_irq_vectors() return
 value check

On Wed, Oct 15, 2025 at 02:01:17AM -0700, Harshit Mogalapalli wrote:
> In cgx_probe() when pci_alloc_irq_vectors() fails the error value will
> be negative and that check is sufficient.
> 
> 	err = pci_alloc_irq_vectors(pdev, nvec, nvec, PCI_IRQ_MSIX);
>         if (err < 0 || err != nvec) {
>         	...
> 	}
> 
> When pci_alloc_irq_vectors() fail to allocate nvec number of vectors,
> -ENOSPC is returned, so it would be safe to remove the check that
> compares err with nvec.
> 
> Fixes: 1463f382f58d ("octeontx2-af: Add support for CGX link management")
> Suggested-by: Paolo Abeni <pabeni@...hat.com>
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
> ---
> Only compile tested.
> 
> v1->v2: Improve the commit message

Thanks for the update.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ