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: <aQCe50-IRGsxbqUv@horms.kernel.org>
Date: Tue, 28 Oct 2025 10:45:59 +0000
From: Simon Horman <horms@...nel.org>
To: Tanmay Jagdale <tanmay@...vell.com>
Cc: davem@...emloft.net, leon@...nel.org, herbert@...dor.apana.org.au,
	bbhushan2@...vell.com, sgoutham@...vell.com,
	linux-crypto@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v5 08/15] octeontx2-pf: ipsec: Setup NIX HW
 resources for inbound flows

On Sun, Oct 26, 2025 at 08:39:03PM +0530, Tanmay Jagdale wrote:

...

> +static int cn10k_ipsec_setup_nix_rx_hw_resources(struct otx2_nic *pfvf)
> +{
> +	int rbsize, err, pool;
> +
> +	mutex_lock(&pfvf->mbox.lock);
> +
> +	/* Initialize Pool for first pass */
> +	err = cn10k_ipsec_aura_and_pool_init(pfvf, pfvf->ipsec.inb_ipsec_pool);
> +	if (err)

Hi Tanmay,

Not a full review by any means, but this appears to leak mbox.lock.

> +		return err;
> +
> +	/* Initialize first pass RQ and map buffers from pool_id */
> +	err = cn10k_ipsec_ingress_rq_init(pfvf, pfvf->ipsec.inb_ipsec_rq,
> +					  pfvf->ipsec.inb_ipsec_pool);
> +	if (err)
> +		goto free_auras;
> +
> +	/* Initialize SPB pool for second pass */
> +	rbsize = pfvf->rbsize;
> +	pfvf->rbsize = 512;
> +
> +	for (pool = pfvf->ipsec.inb_ipsec_spb_pool;
> +	     pool < pfvf->hw.rx_queues + pfvf->ipsec.inb_ipsec_spb_pool; pool++) {
> +		err = cn10k_ipsec_aura_and_pool_init(pfvf, pool);
> +		if (err)
> +			goto free_auras;
> +	}
> +	pfvf->rbsize = rbsize;
> +
> +	mutex_unlock(&pfvf->mbox.lock);
> +	return 0;
> +
> +free_auras:
> +	cn10k_ipsec_free_aura_ptrs(pfvf);
> +	mutex_unlock(&pfvf->mbox.lock);
> +	otx2_mbox_reset(&pfvf->mbox.mbox, 0);
> +	return err;
> +}

...

-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ