From: "tip-bot2 for Li Heng" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: <stable@vger.kernel.org>, Hulk Robot <hulkci@huawei.com>,
Li Heng <liheng40@huawei.com>, Ard Biesheuvel <ardb@kernel.org>,
x86 <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: [tip: efi/urgent] efi: add missed destroy_workqueue when efisubsys_init fails
Date: Sat, 22 Aug 2020 13:39:00 -0000 [thread overview]
Message-ID: <159810354080.3192.12090747441096902319.tip-bot2@tip-bot2> (raw)
In-Reply-To: <1595229738-10087-1-git-send-email-liheng40@huawei.com>
The following commit has been merged into the efi/urgent branch of tip:
Commit-ID: 98086df8b70c06234a8f4290c46064e44dafa0ed
Gitweb: https://git.kernel.org/tip/98086df8b70c06234a8f4290c46064e44dafa0ed
Author: Li Heng <liheng40@huawei.com>
AuthorDate: Mon, 20 Jul 2020 15:22:18 +08:00
Committer: Ard Biesheuvel <ardb@kernel.org>
CommitterDate: Thu, 20 Aug 2020 11:18:45 +02:00
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.
Cc: <stable@vger.kernel.org>
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Li Heng <liheng40@huawei.com>
Link: https://lore.kernel.org/r/1595229738-10087-1-git-send-email-liheng40@huawei.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
drivers/firmware/efi/efi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index fdd1db0..3aa07c3 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -381,6 +381,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;
}
@@ -424,6 +425,7 @@ err_unregister:
generic_ops_unregister();
err_put:
kobject_put(efi_kobj);
+ destroy_workqueue(efi_rts_wq);
return error;
}
prev parent reply other threads:[~2020-08-22 13:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 7:22 [PATCH] efi: add missed destroy_workqueue when efisubsys_init fails Li Heng
2020-08-22 13:39 ` tip-bot2 for Li Heng [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=159810354080.3192.12090747441096902319.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=ardb@kernel.org \
--cc=hulkci@huawei.com \
--cc=liheng40@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).