Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp418318pxa; Wed, 26 Aug 2020 14:23:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxUnqg+LQ+mgG+9VciceHFTvX/TmC3UImRlcJHCojdlMGVyjhTlki0MEU72bFJsgUl09oO X-Received: by 2002:a50:ef09:: with SMTP id m9mr16895790eds.230.1598476989182; Wed, 26 Aug 2020 14:23:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598476989; cv=none; d=google.com; s=arc-20160816; b=bScPhS6BjlW78xhFFAUgCe25Sfnug+OBHp/y1SUjetpqIpikBJ3QSLjVBDHTMYKMIM frchAGD/etG/5SQn8PEp2L7XVOkCTS/4PuSfmF2/mW3ymS1LsZ40z2lii8jqPZw+wvDv 86OXuq6b69KtEWNioikd93KRns+YzTu72K/BvzcBOWinBeung2SJbTLF7Tj4FmygdV75 u131lGNsKlR5PgfiPrwGPLmxL+Qtdam9imv7XH696usSNd4Fi2g4AGFpQiT1pk/rYNhy 2Ei7YMVFONUOK83FIBj1Kb8lS4FNHakHk75LN9wPHCd60sWiZLuAINGOWomvyGNcQ0VU 626Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:dkim-signature; bh=Xsfx+KabYUh+DH5+P2LawgczRML7gRo0hmmmop5VVHQ=; b=cK3NpiBqjfnhtHjHwzCtIQbhxVrcO+7ToLubTrcF9zRnFCcg/oHlR6RW/t7Fppa+SB wnD+DZrIanMXnBi7/VLzziC45c4tC+bU7uC6v4unSDX8nEpx2c77MLrGoW1mXKh0XmGp he7v2d914az6mnqVxHxtHAdhRvECAOFepNd4G9gZmaUXHB4D8WAyyXc1q4R4csZDtlnz 7az1V+TGgO4wnhzifo3vpu3hdihenUDyFBNoDxaUJm7uJIWROsyh+ehbcIPVu8RoFSoD H+u0vOKJT6XSX/Tl+hvF4YwYtNE9CE+I6RpEo7SWswcGu7e1uNpySSgf4V4F93KaAOcR pbfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=JcmJGGf2; 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 r5si137532edx.458.2020.08.26.14.22.46; Wed, 26 Aug 2020 14:23:09 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=JcmJGGf2; 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 S1726952AbgHZVVx (ORCPT + 99 others); Wed, 26 Aug 2020 17:21:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726753AbgHZVVw (ORCPT ); Wed, 26 Aug 2020 17:21:52 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB8C3C061574; Wed, 26 Aug 2020 14:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Subject:From:Cc:To:Sender:Reply-To:Content-ID: Content-Description:In-Reply-To:References; bh=Xsfx+KabYUh+DH5+P2LawgczRML7gRo0hmmmop5VVHQ=; b=JcmJGGf2yA5/kdHpckUJrt/PTG 1AeBqLH5ZuPIzzV1aSlS+fpiw8WWJwvaOthEnyoxDSElm7nPQwKTnSmk+guFm+BdgXHG2jmgM3evD Dju/YtKirQ0VMCl8l35SNVWt/7qtd34/1EGYbh7eit5LmnRIUEqYXm1UraOVYVuWGn0tsnCsLkXAn ZXneyhuQvgKZrwETjYgKiuDzI37JZuAWjiL3MwlK0loltDVfDKbYbgxX0ZldCW7euUHWETtKmBbG1 MTJNw+2Y29RMafHfIbtLtK36zkJK5euVtlgt9Vo/8IeNl4qxx1mcdwdxJU4Fw/jdZIGHCUFRgU3CI Dxq70WLA==; Received: from [2601:1c0:6280:3f0::19c2] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kB2rb-00013Y-4X; Wed, 26 Aug 2020 21:21:47 +0000 To: linux-kbuild , LKML , Steven Rostedt , Masahiro Yamada Cc: Changbin Du From: Randy Dunlap Subject: [PATCH] kconfig: streamline_config.pl: check defined(ENV variable) before using it Message-ID: Date: Wed, 26 Aug 2020 14:21:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap A user reported: 'Use of uninitialized value $ENV{"LMC_KEEP"} in split at ./scripts/kconfig/streamline_config.pl line 596.' so first check that $ENV{LMC_KEEP} is defined before trying to use it. Fixes: c027b02d89fd ("streamline_config.pl: add LMC_KEEP to preserve some kconfigs") Signed-off-by: Randy Dunlap Cc: Changbin Du Cc: Steven Rostedt (VMware) Cc: Masahiro Yamada Acked-by: Steven Rostedt (VMware) --- scripts/kconfig/streamline_config.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- linux-next-20200825.orig/scripts/kconfig/streamline_config.pl +++ linux-next-20200825/scripts/kconfig/streamline_config.pl @@ -593,7 +593,10 @@ while ($repeat) { } my %setconfigs; -my @preserved_kconfigs = split(/:/,$ENV{LMC_KEEP}); +my @preserved_kconfigs; +if (defined($ENV{'LMC_KEEP'})) { + @preserved_kconfigs = split(/:/,$ENV{LMC_KEEP}); +} sub in_preserved_kconfigs { my $kconfig = $config2kfile{$_[0]};