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]
Date: Sat, 15 Jun 2024 13:15:38 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Geetha sowjanya <gakula@...vell.com>, netdev@...r.kernel.org,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Hariprasad Kelam
 <hkelam@...vell.com>, Subbaraya Sundeep Bhatta <sbhatta@...vell.com>,
 Sunil Goutham <sgoutham@...vell.com>
Subject: Re: [net-next PATCH v5 01/10] octeontx2-pf: Refactoring RVU driver

…
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
…
> +void otx2_disable_napi(struct otx2_nic *pf)
>  {
…
> -		cancel_work_sync(&cq_poll->dim.work);
> +		work = &cq_poll->dim.work;
> +		if (work->func)
> +			cancel_work_sync(&cq_poll->dim.work);
…

I suggest to use the shown local variable once more.

+			cancel_work_sync(work);


…
> +int otx2_init_rsrc(struct pci_dev *pdev, struct otx2_nic *pf)
> +{
…
> +	return 0;
> +
> +err_detach_rsrc:
> +	if (pf->hw.lmt_info)
> +		free_percpu(pf->hw.lmt_info);
> +	if (test_bit(CN10K_LMTST, &pf->hw.cap_flag))
> +		qmem_free(pf->dev, pf->dync_lmt);
> +	otx2_detach_resources(&pf->mbox);
> +err_disable_mbox_intr:
> +	otx2_disable_mbox_intr(pf);
> +err_mbox_destroy:
> +	otx2_pfaf_mbox_destroy(pf);
> +err_free_irq_vectors:
> +	pci_free_irq_vectors(hw->pdev);
> +
> +	return err;
> +}
…

Would you become interested to convert any usages of goto chains
into applications of scope-based resource management?
https://elixir.bootlin.com/linux/v6.10-rc3/source/include/linux/cleanup.h#L8

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ