Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3091699rwb; Mon, 15 Aug 2022 17:55:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Al7Jsl10Yl5qKeacSCz//wQJRHdlFM5GbIOh7GaZ9yS9dtKQpUPaK+GWINoSM8EV2OGea X-Received: by 2002:a17:90b:2687:b0:1f7:362a:2d08 with SMTP id pl7-20020a17090b268700b001f7362a2d08mr20548892pjb.218.1660611336053; Mon, 15 Aug 2022 17:55:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611336; cv=none; d=google.com; s=arc-20160816; b=RqhoJ+XajfEUJTu/K6p9z7I6QjcIrwJlwuFWn16Vem1B1wKs210mRYFlod9zY2VNPM 00jCO3UIO7lIAXywG7w9fZwjVOMtJyftw3w3CECqBX7uz3UtWp5iQN98F8OpzYZNbN+K jJ1jRyIbRMt/JYaQ7VXzfVwqIFbwA6N+p5BiQD2wHtsf9uCQGHU6VTlqKrCyJywof+10 tyBzqC2gKnWYSd7y4BGiYNemD80yYcjH+ZPtwtofsj/vtDf9z0jm6v/QVdmWzfK2SVM9 WzSKwxMSoBp2EcjSzZJWeyVOO6u3mu1woxbfz2tQQ5vPWQARADYiS9n6GKHg0iALHj+v 80vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IxDYdl1xUN3MBWdOxAUuF5LGHG6VmUcLlwRANZVjnm0=; b=DJHWwfQBbf0vcxGK9Vz4B0PMMvmeIG7OPNcRvOKDtXJ2PW1En9Kkf5BV+DNYMR+H43 mIYxSMoKkC5lxPWzrGoamvV1nKuOC/G8OkGtpK3i2fxKmXhonQIhxXWnVN+IxeKWMrzj y1ZZ3aZvd035l+of5p+BIPNDPn+nFLN0WrLmYY3Wj7XuP2kF6sts4D+J4DFwlGh04epS gvYlM30QYiDGoO8N6XXrp7XiaztWgJBIGi90JEOTFXp5QzXBkgy9OJazjsZbevBYvEtS RsKeMvDQS4TejuRiOX/OAi9648NLTVzBWnhL8xclPRHjr0lm0FcpBB9ktxT52zbsYKxH K85A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ngHfxaXS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 81-20020a630254000000b004224f632c9asi12512843pgc.328.2022.08.15.17.55.24; Mon, 15 Aug 2022 17:55:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ngHfxaXS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346141AbiHPAhr (ORCPT + 99 others); Mon, 15 Aug 2022 20:37:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350614AbiHPAgJ (ORCPT ); Mon, 15 Aug 2022 20:36:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2989718A09B; Mon, 15 Aug 2022 13:37:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1AE71B80EA8; Mon, 15 Aug 2022 20:37:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66116C433D6; Mon, 15 Aug 2022 20:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595864; bh=YSo1sfXbLmU7/IvZ22ZT7QbZpq+Sscru+IpxsROtCVA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ngHfxaXSKtmmt1CYpw8lNgw4RM21vJmhntO9go+L2Jr2POQHyRaDQ8CHd/i48jnvR CZCgNRU8YFYhmRj0w2iEW7vjApFDn9nRLYR3v/x+rhh186l6T/2YWL9VQF5skTySYT awZDgH1od+sx5bM/rwFRkByoyb2dBcXalIh4m2dE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Mina Almasry , Muchun Song , Mike Kravetz , Shuah Khan , Andrew Morton , Sasha Levin Subject: [PATCH 5.19 0867/1157] selftest/vm: uninitialized variable in main() Date: Mon, 15 Aug 2022 20:03:43 +0200 Message-Id: <20220815180514.155562107@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit 360b420dbded8ad5b70a41de98e77354dd9e7d36 ] Initialize "length" to zero by default. Link: https://lkml.kernel.org/r/YtZzjvHXVXMXxpXO@kili Fixes: ff712a627f72 ("selftests/vm: cleanup hugetlb file after mremap test") Signed-off-by: Dan Carpenter Reviewed-by: Mina Almasry Reviewed-by: Muchun Song Cc: Mike Kravetz Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Sasha Levin --- tools/testing/selftests/vm/hugepage-mremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/hugepage-mremap.c b/tools/testing/selftests/vm/hugepage-mremap.c index 585978f181ed..e63a0214f639 100644 --- a/tools/testing/selftests/vm/hugepage-mremap.c +++ b/tools/testing/selftests/vm/hugepage-mremap.c @@ -107,7 +107,7 @@ static void register_region_with_uffd(char *addr, size_t len) int main(int argc, char *argv[]) { - size_t length; + size_t length = 0; if (argc != 2 && argc != 3) { printf("Usage: %s [length_in_MB] \n", argv[0]); -- 2.35.1