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: <20241216103352.GA780307@kernel.org>
Date: Mon, 16 Dec 2024 10:33:52 +0000
From: Simon Horman <horms@...nel.org>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Aviad Krawczyk <aviad.krawczyk@...wei.com>,
	Cai Huoqing <cai.huoqing@...ux.dev>,
	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>,
	Zhao Chen <zhaochen6@...wei.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net] net: hinic: Fix cleanup in create_rxqs/txqs()

On Fri, Dec 13, 2024 at 05:28:11PM +0300, Dan Carpenter wrote:
> There is a check for NULL at the start of create_txqs() and
> create_rxqs() which tess if "nic_dev->txqs" is non-NULL.  The
> intention is that if the device is already open and the queues
> are already created then we don't create them a second time.
> 
> However, the bug is that if we have an error in the create_txqs()
> then the pointer doesn't get set back to NULL.  The NULL check
> at the start of the function will say that it's already open when
> it's not and the device can't be used.
> 
> Set ->txqs back to NULL on cleanup on error.
> 
> Fixes: c3e79baf1b03 ("net-next/hinic: Add logical Txq and Rxq")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ