From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CCE0606A68D for ; Wed, 2 Dec 2026 19:31:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.u-boot-project.org header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default header.b=o/yd7tpM; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=P1H7oub7 Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A118551D5D; Wed, 2 Dec 2026 19:31:53 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id KEPcxcZPlNPK; Wed, 2 Dec 2026 19:31:51 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp4.osuosl.org 3C950517BC Authentication-Results: smtp4.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796239879; b=NTIK4qaNZaS2BBDdh0FwfKoItfNa3XasK7qbRHyXUzu2t4z5bEKG33Z0YR1fNyKWcfUL RMES1LXaFvPNdOD6mjcVyEgSySr6X0UHf3RS4hB/2ZZN6jkbkOuLzKpnBEnRUzcrdNDsw 8fVSyPkWG9cBF2BXUV0QrkfYZF3gXv5gVBYFmtEIiknUeGE5TAbetxXX4AEbbmkYtbP71 l4GI3peJsOZ0tJW+vUdN6osBYM+YPgDHZH4wr7fEz6YsHwdOtUxsMSgaXxF4JtEkyIDBV xztEEnyvW9zYbirS2YP5DRcKvJ4RuLYeTZEb2jyAGBgL1lzrSilZpEhhs1y//A/9DmQ== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796239879; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:X-Envelope-To: DKIM-Signature:X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:X-BeenThere:X-Mailman-Version:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help: List-Subscribe:Errors-To; bh=XJfKnr0QrwkW/e5050PK3V/XchnXb2x7Sd0lpIFoS7w=; b=gFrid1HT7zrrsBL8ChRB+ruR4OUpQ23cI/iZ8IuHZLWwTXxHBjxGtFU8WFFjeKX9pHSD TwUvrGjfULBzPE9tEoJ5MacxjvuqGg+iYu4lnxc+ApmNsvkHuxh/FFGw/e6acHhn8Vu9X gyzip/HBSA1J1cH9XzW0x+djb66o3X38C5YyZbIestVD/M/uHTGbp7lZpnXBjOF+Bc0I9 K9VVniei0pPFulS4ymz4vdbjTFDVmnG7aG1ja6BwcC21xHGUYlmpCs7XIbWpWtewnPZab hO6mMtDuMAo/j7gf/qenr/+OPvX6q/idXBmef9ovq8R6QWB4oBD9VtPsHvmCLe4NXRA== ARC-Authentication-Results: i=1; smtp4.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org; s=default; t=1796239879; bh=XJfKnr0QrwkW/e5050PK3V/XchnXb2x7Sd0lpIFoS7w=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=o/yd7tpMZp+yxDlKJZjK2jELiNxIPxl1WE+oLJV8WI8DwgjnS6bH97hP48Ir/Vjyk O0eu0XpHFHTaiuV6r1yPSZ9T789nBLjsI3kzhjZgFh06hnzAuCCepyt+uSoF+apNym Di0og2kJXITL2/m03eOvmLoccWpg1V4RkDvXdXKwkC1hqGEqJoXJlYTwTnn27YMiaN Qm2H21Tmui5T/26FBflc/kdSY3OdXvgQaWyDGWPhK0CToX4HNh9QwFTWWcc9WpMNUn fHI6ghy756QH+x7HvoWNErsQxqhuXwQrreFoCOr+MlO08Rg9qExVFueNkridOYlHzV Emm7QhRqkhqzQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 3C950517BC; Wed, 2 Dec 2026 19:31:19 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists1.osuosl.org (Postfix) with ESMTP id D89272B1 for ; Wed, 2 Dec 2026 19:31:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id BE883409FD for ; Wed, 2 Dec 2026 19:31:17 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id v0zhE98Hg76a for ; Wed, 2 Dec 2026 19:31:13 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp2.osuosl.org 1C84942C7B Authentication-Results: smtp2.osuosl.org; arc=none smtp.remote-ip="2001:41d0:203:375::33" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:41d0:203:375::33; helo=mta1.migadu.com; envelope-from=bradley.morgan@linux.dev; receiver= Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=P1H7oub7 Received: from mta1.migadu.com (out-51.mta1.migadu.com [IPv6:2001:41d0:203:375::33]) by smtp2.osuosl.org (Postfix) with ESMTPS id 1C84942C7B for ; Wed, 2 Dec 2026 19:31:07 +0000 (UTC) X-Envelope-To: u-boot@lists.u-boot-project.org DKIM-Signature: a=rsa-sha256; bh=C1zl5VsdLW9j0wT4ZwxscCNi8WHRuL72dbTIiXBu0y8=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796239864; v=1; x=1796844664; b=P1H7oub7dTDp5oXNEKnAOdtpF2wmK/S5qkyymUc6ovGxRSFP0ruUA98UwZHHJRcCwnwIlSSp ARRwADDmLtpPhOZTv2MCL6qwueRRdQKEZY+RrTm3WDeKmtn2kkv7iPRiWOFbvrrO5Q3gEG5txlA Z83ksrt93HHaU7zgjOjNsU84= X-Envelope-To: u-boot@lists.u-boot-project.org Received: by mta10.migadu.com with ESMTPS id 8eab36c23a043fcf; Wed, 02 Dec 2026 19:31:04 +0000 X-Mizu-Trace-ID: 8eab36c23a043fcf X-Migadu-Flow: FLOW_OUT From: Bradley Morgan To: Tom Rini , Bradley Morgan Cc: u-boot@lists.u-boot-project.org, Christophe Leroy Subject: [PATCH] powerpc: bootm: propagate cmdline and bd_t allocation failures Date: Wed, 2 Dec 2026 19:31:01 +0000 Message-ID: <20261202193101.353433-1-bradley.morgan@linux.dev> X-Mailer: git-send-email 2.53.0 X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 do_bootm_linux() ignores the return value from boot_cmdline_linux() and boot_bd_t_linux(). If either allocation fails, bootm still jumps to the kernel with a NULL command line or board info pointer, which turns a clean allocation failure into a kernel fault with no useful diagnostic. Return the error to bootm instead. Signed-off-by: Bradley Morgan --- arch/powerpc/lib/bootm.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 9b0ce9c4b81..5c3f5fb805c 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -179,15 +179,11 @@ int do_bootm_linux(int flag, struct bootm_info *bmi) struct bootm_headers *images = bmi->images; int ret; - if (flag & BOOTM_STATE_OS_CMDLINE) { - boot_cmdline_linux(images); - return 0; - } + if (flag & BOOTM_STATE_OS_CMDLINE) + return boot_cmdline_linux(images); - if (flag & BOOTM_STATE_OS_BD_T) { - boot_bd_t_linux(images); - return 0; - } + if (flag & BOOTM_STATE_OS_BD_T) + return boot_bd_t_linux(images); if (flag & BOOTM_STATE_OS_PREP) { boot_prep_linux(images);