From patchwork Thu Aug 28 02:07:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 146 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756346877; bh=gazZlT59w9TUlc/e63heGqpvXnsEQiqGmoG1Gc3v7sk=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ZszoR5mwMEn0ADGNkefbKR+NwiuX6wslQaZsnBsYFizjwN4GKQQA7KfiQT2NzYgRH NqC09WyBsz5Bz3HyFOUc8OYXhxSON6+B10izMcHO+17hpgvg+LtZ/FvSqk2Smmfuu/ 6xLYkbpbsdpDz8KTOaMYQXw5Th5N9anztqRn7uc1h6loCKa5d9k5L9UoUn73LOfZvg jTOvGOWsKpsg50OJdO9t5KJsn/T127vrbhg7J+cawJ+yg45YKI8Sq3TaeE22jqGJmP v+LCc6ryYBSdIA4Skk3sL4Z1k4u5UWR0FgJA0iMNXwehut1hEDdn70vqVZ4t56lZeZ j3nT4wHQEkv6g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id F33FF6777F for ; Wed, 27 Aug 2025 20:07:56 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id JVcGRtMITkLf for ; Wed, 27 Aug 2025 20:07:56 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756346875; bh=gazZlT59w9TUlc/e63heGqpvXnsEQiqGmoG1Gc3v7sk=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=m+FmoleQ7FlnILL1w5SKyyFAUBcUkB8RrXadLbCYZtlxj+ZLLDU/WCwzD4bBMn0Mg 3IxHKw0VnMITQz066V9bupM4FVRsXxbjREn80onvAP3IyBe3jiXSegShKa9+hxlGAZ EttLj2pnvL6q8EJ/rOD4haKKtmHyVe5D7uozyS8aGVwTMEY7/RQAJjvKRqWeV+sBAx kTztRa/GOjUJTkYILjsI9Sn3Y2BTOVfaSJROPcZJiNJwKLAISR627rRrUJoPMRVMMM qZHDl0SXKHwnHyHYXa2BYJLrr5fTHzfDhAyI/pNMJfxqUBkJpycyLOZl3M8n7of6xS fXRpUayxGmnsA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C0B586780E for ; Wed, 27 Aug 2025 20:07:55 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756346874; bh=6wm7rTvdm1708xRMhgllRqxp0h01WxKs4dll/yJEJZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XEpq1t/7ObTviMa7wb7RJLe6yyoVaqO8bcFkOpW4VsYXxJawyfwXdt1oSTEiPyVt+ ovKsieGugb0hIxmEuZaynXlFQY8rzzL+vrh+SORu+/8zRTvnVGf94jhot6llGXjpuC ZVSiLZMDTaRXEKb+d6JPfRjhRi2gemhkU9gvhtNoU7BrFkuRsWQQjYv1wdQn5EecTh 63hAaj6+l8FX3wQVRFn39RDXE3ZknMSBm6FV+I3mMXF45WRIQoc9T2mnMbnvQuV9pF gx900RdgbaUOAIDLCjW45248yD2v+melJHRD5ycC7cYD/k3ecYozPAD49xBsvY2khV rJ6Ew5d1DbUyA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6CC99677CE; Wed, 27 Aug 2025 20:07:54 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id YERtc9wqbatl; Wed, 27 Aug 2025 20:07:54 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756346872; bh=pMp0+oU2xnFH+Oco5Kwqki3N/uv1g44ehMjAwwerkwg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QVDnV0Z4fN1rmvSAosfL+1kDfxoUXgYYEaE+F8Nfwv0qLElFrwEI5RSXxCKF1yVll k/uavqQBitxcW01sO9vc3ubvf0zgbUrpWeBgDxePytqtIlSxw9W4LZuhE29nikuJMh gxI6GISApQA2y6FewKJ5K9hdCy0ux1A9b9NHXfK2Fam+dFbIL+GJocJar7/PhENZe8 qUyxdjyHNZwUXSyponLvDERqr1FioZn2MNdYpz19CQNgMtdhrQfGTSSW3coXpRQ0Rr 4oSaztm8rQz3HKKEqUIsvvE0XaT5/Y54s3NMYl9wU9HFycQxUz/sCXrS9pIsEN1aqe lpo7ARdO2RqGA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 1A26F6780A; Wed, 27 Aug 2025 20:07:52 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 27 Aug 2025 20:07:06 -0600 Message-ID: <20250828020732.981415-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250828020732.981415-1-sjg@u-boot.org> References: <20250828020732.981415-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: U42P7H423KNRHM4HTICBVX7AXMRXJYLC X-Message-ID-Hash: U42P7H423KNRHM4HTICBVX7AXMRXJYLC X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 03/20] efi: app: Avoid freeing memory on exit List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The private data is used to perform the exit, so freeing anything used by the app may cause a hang or crash. The underlying EFI system should be able to free any memory allocated by the app, so just skip the call to free_memory() Signed-off-by: Simon Glass --- lib/efi_client/efi_app.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/efi_client/efi_app.c b/lib/efi_client/efi_app.c index 7c9c156e006..f67973dbb85 100644 --- a/lib/efi_client/efi_app.c +++ b/lib/efi_client/efi_app.c @@ -245,7 +245,6 @@ static void efi_exit(void) struct efi_priv *priv = efi_get_priv(); printf("U-Boot EFI exiting\n"); - free_memory(priv); priv->boot->exit(priv->parent_image, EFI_SUCCESS, 0, NULL); }