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>] [day] [month] [year] [list]
Date:   Fri, 17 Jul 2020 09:47:41 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Wang Hai <wanghai38@...wei.com>, netdev@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
        Vincent Cuissard <cuissard@...vell.com>,
        Samuel Ortiz <sameo@...ux.intel.com>,
        Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH v2] nfc: nci: add missed destroy_workqueue in
 nci_register_device

> When nfc_register_device fails in nci_register_device,
> destroy_workqueue() shouled be called to destroy ndev->tx_wq.

Would an other imperative wording be preferred for the commit message?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=f8456690ba8eb18ea4714e68554e242a04f65cff#n151


…
> +++ b/net/nfc/nci/core.c
> @@ -1228,10 +1228,13 @@  int nci_register_device(struct nci_dev *ndev)
>
>  	rc = nfc_register_device(ndev->nfc_dev);
>  	if (rc)
> -		goto destroy_rx_wq_exit;
> +		goto destroy_tx_wq_exit;
>
>  	goto exit;
>
> +destroy_tx_wq_exit:
> +	destroy_workqueue(ndev->tx_wq);
…


How do you think about to use the following source code variant
for this function implementation?

	if (!rc)
		goto exit;

	destroy_workqueue(ndev->tx_wq);


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ