Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1540159ybh; Mon, 20 Jul 2020 00:22:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxQJb0tEZu1QXLGyw2LHVObLEDoPQHvmGaWRB2fylkDe5AV7B6v6etPPJQ+k+cKsVOrbvB X-Received: by 2002:a17:906:3c10:: with SMTP id h16mr19291842ejg.87.1595229725699; Mon, 20 Jul 2020 00:22:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595229725; cv=none; d=google.com; s=arc-20160816; b=sU1kDmr2q55UVWuDiIRNQFz5MXjUaxT/rCrwZB6PA9lBz8N1eyPrBXZDAPjFCu1a11 QFYA7SuTPLZSS4Ysgifk46qQEP4jYh/h10ttNpDZr3jWVhxbademhdrl6CqMaxRzzdKw ZhOlgq+WjZtJLR6N+qs8PVrO74Fs7pkY94YFqQZHV6j25jDFT3EbonHkp9q8vxb4OmCg JFpTn3MrhznK3jqeSw02JLkdTrFIPu4W7U10x1JkwR5KpjkZDQ3+tCcyWKIguPWPTtT3 KxKWB1EVY9Xmn1saFpr0qjq7mqYvagia5T6bnggUftzaIum6TT9FmvJjREGlrgFFakW0 +7RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=WDdpM60OPZ7csVYmuTUAHnOEHLzxPYTxPBdlTY1PCbU=; b=PaBMYwOKt29XE7WVnWWQfOB+/eViiSUJWhCn3/D443JmsDWf6Roa32fvX5SR3Z9bUQ dVTTeJ5oj7uMaViAPw39ca6nIMZwxPn1GbRt59X/+W9skLzKqRYWHo4uUZg94btE+m25 i/FdD+m0i2iljCDigzzR/+VtaguIgC0Usckt7dAeiHfN5TCXSyvP5CgJsV+ltj2qNoN/ 4WL5F/CkSbWsQBjOoZtNaCmsespG2qju6IGH8a3Gy1Tqlu1HRKnrlVbYqsytKwNBW/m0 UMdPCOkOWdFPs7Bi0sOtawkW6XULT4BrfQlFTdChvBXGi+qlFx3cHdBA8fvKbkgoswyW hQYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t22si9743062edy.39.2020.07.20.00.21.42; Mon, 20 Jul 2020 00:22:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727094AbgGTHUx (ORCPT + 99 others); Mon, 20 Jul 2020 03:20:53 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:35642 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725815AbgGTHUw (ORCPT ); Mon, 20 Jul 2020 03:20:52 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 921756D60384099ACE38; Mon, 20 Jul 2020 15:20:47 +0800 (CST) Received: from huawei.com (10.175.104.57) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Mon, 20 Jul 2020 15:20:41 +0800 From: Li Heng To: CC: , , Subject: [PATCH] efi: add missed destroy_workqueue when efisubsys_init fails Date: Mon, 20 Jul 2020 15:22:18 +0800 Message-ID: <1595229738-10087-1-git-send-email-liheng40@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.104.57] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org destroy_workqueue() should be called to destroy efi_rts_wq when efisubsys_init() init resources fails. Reported-by: Hulk Robot Signed-off-by: Li Heng --- 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 5114cae..f8cce41 100644 --- a/drivers/firmware/efi/efi.c +++ 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; } @@ -420,6 +421,7 @@ static int __init efisubsys_init(void) generic_ops_unregister(); err_put: kobject_put(efi_kobj); + destroy_workqueue(efi_rts_wq); return error; } -- 2.7.4