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:   Thu, 23 Jul 2020 08:28:26 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Li Heng <liheng40@...wei.com>, linux-efi@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Ard Biesheuvel <ardb@...nel.org>,
        Rui Xiang <rui.xiang@...wei.com>
Subject: Re: [PATCH] efi: add missed destroy_workqueue when efisubsys_init
 fails

> destroy_workqueue() should be called to destroy efi_rts_wq
> when efisubsys_init() init resources fails.

* Can such exception handling depend on the data structure member “efi.runtime_supported_mask”?

* An imperative wording would be preferred for the change description
  (besides another bit of fine-tuning), wouldn't it?

* Will the tag “Fixes” become helpful for the commit message?


…
> +++ b/drivers/firmware/efi/efi.c
> @@ -379,6 +379,7 @@ static int __init efisubsys_init(void)
>  	efi_kobj = kobject_create_and_add("efi", firmware_kobj);
>  	if (!efi_kobj) {
>  		pr_err("efi: Firmware registration failed.\n");
> +		destroy_workqueue(efi_rts_wq);
>  		return -ENOMEM;
>  	}

How do you think about to use the following statements instead
in the if branch?

-		return -ENOMEM;
+		error = -ENOMEM;
+		goto destroy_workqueue;


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ