From patchwork Fri Jun 2 09:52:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Storm, Christian" X-Patchwork-Id: 1789543 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::53b; helo=mail-ed1-x53b.google.com; envelope-from=swupdate+bncbdd6bwv65qpbbtxx42rqmgqepamguga@googlegroups.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20221208 header.b=AUpNQ269; dkim-atps=neutral Received: from mail-ed1-x53b.google.com (mail-ed1-x53b.google.com [IPv6:2a00:1450:4864:20::53b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QXdZq4dxxz20WV for ; Fri, 2 Jun 2023 19:52:17 +1000 (AEST) Received: by mail-ed1-x53b.google.com with SMTP id 4fb4d7f45d1cf-513f337d478sf1253410a12.3 for ; Fri, 02 Jun 2023 02:52:17 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1685699535; cv=pass; d=google.com; s=arc-20160816; b=INsv9hIrll7XPexMQ04iVSxZkCpMAFrMnb2OSqLl4eiXG7IXvDar7HTrSlKHFaxYJL PJOrNvskKs5gPYqMWyBzSqENBu7tjylcdpCpYAJKpbp7pn5kX0jkb47Qo2pCfbn7ompB qgmpWp+iRWghhd2FN2QproEoY78earJb/GO93vx+BYnnq7dV+vtlxxQCzHcLIhlUn93C M0y2cj671FgF9n1RtW+KLHJd6Pex8oQJ58wa3yS+wsBMLOGijltsIpfbMxtaj6hlxP6h R7nwnKw+0Hm88FN/i560mFu/uRcZtU50zJfl4K8Cz0yD1cVIv1N+Ty1t5rqfEfn6tQhp Nhyg== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:message-id :date:subject:cc:to:from:dkim-signature; bh=Sd2/EcGZo+amhjIjSov2eHgQ3LGOCGrlt9uu8B+t28U=; b=w+1u9+lgp+BaxB75jUAJK3+ZRvEFmXpjWzvbA6HQtZfp3Dz3NqeqgzeA+hsvyS482w p2qb7/ujE5ig83FcLO51psfKkJzifDlPb/mYdiROmDX2OomNrUknZ/mW6iVa4U0/6Cfz bO2fdsGz/PyoESYKEGhfA4zsoutSgVGfZ/oMZVAl2dklk1fwstpYiiiGK6YGO3qOgfII Zc7mH2jwMG+ipSCoXmKEMkb3G+6CgCfqiyyL9zgATWgfj6nFZ0duEAL7T3YzxKhfuOxV plSDUYV+42y15EODyvoM4zAA7QNctXIh92sjIymIR98gZDvg7liVvLTZDXx40p+K+IKk YvqQ== ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=zwrqUnHf; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f400:fe13::614 as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1685699535; x=1688291535; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Sd2/EcGZo+amhjIjSov2eHgQ3LGOCGrlt9uu8B+t28U=; b=AUpNQ269gNYSf6xel7/6rde7qa8BTJYRCoW/6P7iXBpzEw5eZLuMRD+ZJUJfSreYkT y2Y7icrbOxkDlPejma8KqNgR2sQ7okiNWycjORELHYf0VLT/48/0bGSh16npAxC7ohoB v36dQ/7CiXlBG88D8TABEN3ce95edw1bbsYgQmKvonM+2naIrtW9O1L7Ygo10Rrb3gCV FI5G6nYxH2SyLi7nkVtILo53d3AABLg/W6oYnSNw7fO9k3AH0HbsLoDuGSjPgsXeh/DV WiFeLdl49HEJy1aGwlvmomrjshaeMVWIFYZp2Hk91RHFarGqN3FEMCM9moHhjLlryn4Y kKjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685699535; x=1688291535; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Sd2/EcGZo+amhjIjSov2eHgQ3LGOCGrlt9uu8B+t28U=; b=jEEZ/MJuvfMSZbkgGAq8eEKmrcbzToI3RCnCjyanaLl4OD7uJlKnZbC9xpgtGsrPtE WMB0gpD1Cq+pgnkW0sGyBwZNk9h1S/SKnZSotN2OLahpg6qjdvP+/BuA6a0OVlo4/tyQ 3X40jUHOka98rlEZSXvqc7hNusCphtznF0iqoaks4jo4zEsnxohETXpJq+51cshyeJeX 3H10svtsetY/+t8mlzKYMNaFG5R3VCV8EdZ0/QA9hC8O2QPAhwOOaPMcHLnmNeseuGx6 69iO3tmYbCtl6OIRXXZ9JjWYlV6kCCCO2cinjTRIxt9okM54PngXCcktPI9NjFPrte2D CGWg== X-Gm-Message-State: AC+VfDymol1z/1wNueSGaNxZKgqFeClrMesBAOBj8IcvIZcEOKzWpfQS hSYLYScFCBhYEWoavogoG4s= X-Google-Smtp-Source: ACHHUZ66zc7DWIKZ2WMVvJM6dMeBc4Inl0/zneSmcglYzEajbmlWQa9AZ9RaXF81iKsBIVvPVLfQVw== X-Received: by 2002:a05:6402:785:b0:50d:8991:d1b9 with SMTP id d5-20020a056402078500b0050d8991d1b9mr1547494edy.8.1685699534633; Fri, 02 Jun 2023 02:52:14 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6402:31ef:b0:50b:c3b9:c10a with SMTP id dy15-20020a05640231ef00b0050bc3b9c10als511398edb.0.-pod-prod-05-eu; Fri, 02 Jun 2023 02:52:13 -0700 (PDT) X-Received: by 2002:a17:907:2da4:b0:973:940e:a018 with SMTP id gt36-20020a1709072da400b00973940ea018mr9917102ejc.34.1685699533111; Fri, 02 Jun 2023 02:52:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685699533; cv=pass; d=google.com; s=arc-20160816; b=XD/Ug8J1Ok39d/yUbkXyxq/CyHhA8zYeOM6WOfH6gUJXyDcX3gJ60FkraBEyWF/crQ BzeE7Zq/qo1WqmtiutbZmfwqYCVKO71UJeR6we4dwEuhV7kOvffq0Dvkp5rYygpKshDT dN1yu65KThaZj9chyJMTwl0/BGe+W0l5s9BOiz0qwvWqoYGNW7gLfmtZnU+t16MVVUbd CNT/uYPffJ1NYqHqUYVZxMqYVQy+bxkHqFCgjtrmao5+3tkBa5lCzMsssYIvrxbMtH19 kusMLmIYb8HVS2ud0ghaRSzO7ZifOtvSgY7IAyNzWKCQOieXHltX5dw5dV4CS4EI7VQv vqOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:message-id:date:subject:cc :to:from:dkim-signature; bh=QlLfp6cgqZUXxZcnq3PY3SHCt9m+dTqZq35nbO1LqYY=; b=emvrcaBspXUrghqiZZdkmhZEC+rc3tBC7/gGKFXeTEJJ10z2Bt7Tjku8BV7hkAiKSr VLRNi7kyf5iJhEhcJ82kYzmybAxv3ONmk9VvrNx/yIuTcc6ICq0CmXTSJsKlDH8n4TzH 9cpUoVt4qJTyyYbUWQHywRr0hCViCemJHX2twjbJ/IxLWlrPstQVSJip/cS6l00X79fQ FjGvt8Z1Se85vC5MROeDH2kRWgoM89d1jpPK78sZsgprhdUpC7x1xOpljIpIrRms/o/F DQkvu7PW/hXkcEkcxuuu+2dCXPCMLVJyAdRTSI26GMWZKkgrJ8bh/ncXiU7vLwiNQm67 xJpw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=zwrqUnHf; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f400:fe13::614 as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on20614.outbound.protection.outlook.com. [2a01:111:f400:fe13::614]) by gmr-mx.google.com with ESMTPS id ox3-20020a170907100300b0096f6a9166cbsi95523ejb.0.2023.06.02.02.52.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Jun 2023 02:52:13 -0700 (PDT) Received-SPF: pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f400:fe13::614 as permitted sender) client-ip=2a01:111:f400:fe13::614; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RPrHTeq/KtpkjKt9EKzFE/LWTXmJMSUrfmqCFBcnvF3uQcBsYxmDIzfrwY62DznhqOl7hZ48iU0yzR2NnfbOhCiNHxYyevbruP1R1GJ4T0vhyzqj8Jkjon7nbk6FWkPw9cNsoaCHOF0u3ISf/mLMvymODdP9lkNnx+dvDXbCwjKgy4oTeIUkZMLpBg1QZZ9GCpswizIj7O+sWc/ZbsOMlaqRP1s/6eORCP3P27Rd3dCjS1BKzQW9bNz4Hm6vu8PvjEaXs8eDZkAHStH4/oDaH5/n+wZ0+Oecsl0k2Up9gxiUlWPt29zBwiGyooJYVzpH1xO72NEWequgRyavoPUmeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QlLfp6cgqZUXxZcnq3PY3SHCt9m+dTqZq35nbO1LqYY=; b=IdYX0gGiD0RlBfpsZRaAJsdZHTYqNkRfMpLjdF66p6w67nUGqNchIE1L3CqbhaRiRnup2FqmZxyFU5oyeoN6w6FuGgSDZBpir/7vgZ+wU+xnI4WPxdCB5Zk6bgyXgGw7CYp3RMcEZCAvxDFJJAIGTRfPLFvB40Pvd8IdsC43sfg5nNmD6Vw2uLKYVjgW8/se1/ayPJCdCcuO0sGzC0cgoNMErBxt9VtEOZKxuXxWUep26TM162FObes5rrjnOht5GdyJrsBMDqIjzTmw0C69toMHDMSaJOTGVczLVTcVJjm6NT9l6k+E86IZeQuDvcOGGtM7gNLzjGHOeWV0CNWwGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none Received: from DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:333::17) by AS4PR10MB5800.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:507::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.26; Fri, 2 Jun 2023 09:52:12 +0000 Received: from DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM ([fe80::6bed:3b93:4756:c9f3]) by DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM ([fe80::6bed:3b93:4756:c9f3%6]) with mapi id 15.20.6433.025; Fri, 2 Jun 2023 09:52:11 +0000 X-Patchwork-Original-From: "'Christian Storm' via swupdate" From: "Storm, Christian" To: swupdate@googlegroups.com Cc: Christian Storm Subject: [swupdate] [PATCH] bootloader: EBG: Add explicit guard for environment creation Date: Fri, 2 Jun 2023 11:52:51 +0200 Message-Id: <20230602095251.55859-1-christian.storm@siemens.com> X-Mailer: git-send-email 2.40.1 X-ClientProxiedBy: BE1P281CA0387.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:80::10) To DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:333::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR10MB5404:EE_|AS4PR10MB5800:EE_ X-MS-Office365-Filtering-Correlation-Id: 0d5a60dd-5876-48db-a934-08db634f0971 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6hIQmuNAy5cas8HsNM7ZX5LMP8lGYMlsFFjx/DaXeQna2nwmqRJIdTCRNm4i68CGYNCawbA8wkyrM6T8UNGMKTxXukingt/7olyu/+j4nL3efcY9AjSj1DBB7yteTyNdXJ41FmMM6Ig87xvKyY7gEWRQeN9Q49o4Yb67Ggbc2kdDUA3VQcSYDEPUbpYv+7BBYbWuzASN6tvoSbFrptmweQrmLtoqcoOSjU/JWIrYJCEIRTgnDdXYBNpHwmEc5W2RmSp4mbnkZjDYCh2HRoxVBlQmwp6dDe61ecep8D/ICkp5C1IOMigpeth7si+mHlDj0UuVolMWnb0xI9MEjfoTLFQ3Rio8+OSyGQApj54CJRd7CTh29ntRwYkwRRfYwH5bCcmY0W3Piu6j26nu0sePoT5YiSP2lBSg2Frxn2+Euhp4igsIBkTSKIRSwcermlmKOIYdY9UflNnisKD8ZdKkFZzrsCRrMrrOQoNBMRJpGhYgdJILrZM13WJXH9szHNvhisYAAHkUXAbvwWRx65I1pbtPalP2v7T9u6pjSqj/q91pPrTIG2frudcOyCEywQyU X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(136003)(39860400002)(346002)(376002)(366004)(451199021)(478600001)(66946007)(6486002)(6666004)(66556008)(2616005)(6512007)(83380400001)(86362001)(36756003)(2906002)(66476007)(1076003)(6506007)(107886003)(186003)(38100700002)(4744005)(82960400001)(316002)(4326008)(6916009)(41300700001)(8936002)(5660300002)(44832011)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nXqcTsWzcklaanvx/1rQoaOV56wWcre2ndPShDf6JDPe/gtv70Pr9aaf9ts3PwQkH3ofsOIN7T79Rts/CXjPE+0ITTUAJrSe7/RvF/VaDjiw8b+pYF40UBTjg5xNI9tWKfeUGiDg008cHMwkcMuFUOk3cNcdEp7hW0DYVj8mZJHCpVC9NZoFZQ/T+3O4AVJsS7bvFl/faAj5PTFua2y64oh+Za80/V0MvyQu4/2UGhv+7Abnxv7jwTSHDlsICV1OMonaipxyyn51vpqteHk6aOfPiLlbvEONCSmBYOD4yzqGxC1TL4x5wIGI3bVlh8IN3QbVJpqk7DCr88CFu33KVgHcKTSpvwsrbaWMS4xH/vExyikkuUGhSkay2f+hGBdrZ/azqAue9mm4RKiP2e23OpIznRkRQ3SK0Ud9vv6/VD7aVmDdBUoTuZQlIG7Eiwx7wEF3bpITipfjesyRs4LiBLsODJ7YecJ4ixBofTHPfrTnwbNM3Jp7Qt43MYqS+v2KG4o2jJAGh6NlWOsKR4skqaK09uOr1/rHL4+Q+JIdGON7+Wp46gBiRqccv6hs9rGcbJ0lwvgeVnQKZB0atJ/F/ivf0tNV7uleeEz5DULzuhpIipUN5UrzZLtYs9aGJn5yGS+IpFDvESfoNDoOc1dn8mCooJ2uNC3L7h5xV90d+pcwTjeBnSWNkOdq+jZjqKp4bYhrFLbG3AdPIqNhpNRZQF0GneZFbcjJ+HAA3VZNDtDblIRCTFUTphyuGIM7oYtPnDgzXNJGfCO01nTuG0aBijvchiEu/P79M7wXiCXawsK0C5uwp7TVjTEL9C6Cl4eGwyUyur2WK5uQ9kx3Ydrh+HesVauNTJmvpd3xIQoswhUlhPOXc+UIzMzMKVzwE1goeAY0qPgKtKmb5LhMLK3j420yKKUGFIJnN3lY66Q4N0P0Dp8lyZoCsrYAhC0hkKexhAhw7ZMWLFdajjg8M0uoChJzxe48FeFuC3QWtpjsZ+Gc/v9s+g/fftYauvOIbJ+lguCLyApPlU2FkEo2WPAab7RNQsyYhU3vEjAMjdGh68xh4ohvKZxqL0SM4mIiSXSP52S3ez3g5qgin0G6M2WBkLYv6r1uBsO1YuMjwHF+7Jbiq0pUkqtAfF2TK8eQ4LM6XON/rcxwGIk16AWSevKPKmUpEk22PeH5K0h2XgIb4sC9pJnSf7KuYWIeAUQmw8a/oiuw00/G8sTsB6iynAiROU8annVbOFfdadCxNUt2xNhpcn+ZFGmeAwC6ENQ+lhIbwdJObtTAbm/Xy+pSeTDBrob4uRVE0+KaCFfL+Hd8aMzGJ106Rp57eJ3ZHXDlz0u6nYZglRX1SjvFKeBn0noSWnDL3+bjxS5Ri/gKSNkM6AJBbzWA8uzvCf4qV6PD1Jue43UApMrp0SdVpbUw77hUpv3eunevaY67SPMuUSfqOhlFrTsSZtB1hj1u6KAq+CiRTJrhQkGCrzNBJaQYg/YI/OEoc043Bq76J7K7Ak7t+/dzEYjoFNWvpLPpoNfWcvLAXPhIm+cKV4nSmMguwqM8xrUlzvdCb1H25SS4FHnwZsHiHFh/FkPA3hc6AyvPJKlgzmMtkFwjQDfLv7x+VHJTcygJD1xxL/zAY3UbjrE3+JtB+dpegjtbovt0Ghqeg93ed9pLH3igUpUef2NzFIDvZA== X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0d5a60dd-5876-48db-a934-08db634f0971 X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 09:52:11.6704 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NyZ7oWJp0XQ1CnectCND9fddr5YhK97RNpXRNr8bYV4ayaj2LmlO2PoZkcf3xiBJ9sIp3DUkjK1JtAir9YNm2IU4pkUzyRBo6TwDJ7V5oOI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR10MB5800 X-Original-Sender: christian.storm@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=zwrqUnHf; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f400:fe13::614 as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Christian Storm Reply-To: Christian Storm Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Add the explicit guarding condition !inflight for creating a new environment. EBGENV_IN_PROGRESS may be (re-)set to 0 while SWUpdate operation, incrementing EFI Boot Guard's revision counter needlessly by one too much. Signed-off-by: Christian Storm --- bootloader/ebg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bootloader/ebg.c b/bootloader/ebg.c index edfc9047..4064f070 100644 --- a/bootloader/ebg.c +++ b/bootloader/ebg.c @@ -195,6 +195,10 @@ static char *do_env_get(const char *name) static int create_new_environment(void) { + if (inflight) { + DEBUG("Reusing already created new environment."); + return 0; + } uint32_t revision = _env_to_uint32(_env_get(EBGENV_REVISION)); uint8_t in_progress = (uint8_t)_env_to_uint32(_env_get(EBGENV_IN_PROGRESS)); if ((revision == UINT_MAX) || (in_progress == UINT8_MAX)) {