Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3017684rwb; Mon, 15 Aug 2022 16:14:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR6WGQPHxb4Gnqbp+XY0V6H9HUjY95cZuDq2GXtdNAWpmDEOdSQ20X7aI3BlpCsLnaFATC3r X-Received: by 2002:a17:907:7348:b0:731:535e:abc7 with SMTP id dq8-20020a170907734800b00731535eabc7mr12118954ejc.274.1660605261190; Mon, 15 Aug 2022 16:14:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605261; cv=none; d=google.com; s=arc-20160816; b=YEvGS1Dh+QybsVBMYcP/m+uPTsuhoe8hBmS7ZKjVOqo7d6qRCI/rlGTYWp3uVJJ2o1 tWcy7CNuMxFpacN92jZJRHwptfVIow0tCTNdvwBv9mVsGo0sLN0/V95w6mRvqSeENHOV 9aaGIIlLUnchE/GH9KHcIORhD9v5JzUztUJ/YFQUdDGKMhrvnSxMyKHGdkW7+o5Mv07N 70+pjUjPzZtkOWrdx+jGQU2yAXSRQ0VQRJ7fgxq1coxjZQKauZ0REFPyfyF/heLzB6i3 7z15ghxpjoePG0Lw+C5KhB5MlALA834xI09eu7F1VnKQKGkqItlmOnJpXldz1u2XDDss zidA== 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=sEbpzW23/U3HZ7F4QLuDHfucWn3eV2sVRGIW2dOomlg=; b=tehXqM/dlxDmpVRTz/56gLaOmOjnA5kb2GE/yBRO6H6fa4lSNaWMjf6gWNg9tdFo7u M3zXKYaI1kb3Gk2S7bASpk6t8P0pFcbeE4Q9NNfi04GvvGIgHL1qXDpO4KTL10H/fVkj mdoj4OrTwtqB+mdn7prf2PFRugII+hIcaiJvZJJ+d7nUIqb7DGNzJxqtFs2pTBSm/uIj FWuXf22RoUgwYshd4bZMe44G1rRdAiwlJKNgAJZHVsKr794sDIHjGdrzXIFam7s9YMY+ gQt53J0eBSePHIlmhs54JYzNcUBXBdCGS/Uk9QvyeqK+Z9uzVewteJCbH0ugLbQ3jOlT immw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=x16JCQbG; 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 lr2-20020a170906fb8200b00707ad2d64edsi8356875ejb.98.2022.08.15.16.13.55; Mon, 15 Aug 2022 16:14:21 -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=x16JCQbG; 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 S1349674AbiHOW0E (ORCPT + 99 others); Mon, 15 Aug 2022 18:26:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350832AbiHOWSk (ORCPT ); Mon, 15 Aug 2022 18:18:40 -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 1AF8141D1B; Mon, 15 Aug 2022 12:42:44 -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 D3E72B80EA7; Mon, 15 Aug 2022 19:42:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 397F4C433C1; Mon, 15 Aug 2022 19:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592561; bh=dN16VvJHR/zUhnh0L+qtYA5bmwA3MJYkt+qkY5TKb3E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=x16JCQbGd4kzJ5pLX1dDkUBc+MlwhlEHDjkX8ahkgVeEohinCXx0E//GdRxeLIJ1j c0b9j4PJAo7pYYUnVsuGyhBCHWnJcOqZdX5qS3FuntRAvp5ktq+pxm38QQ551I/hM9 RZGY8t0UNtLsL4HUG5j4NOv33lh59uXCWjf8U07Q= 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.18 0808/1095] selftest/vm: uninitialized variable in main() Date: Mon, 15 Aug 2022 20:03:27 +0200 Message-Id: <20220815180502.695764789@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 1d689084a54b..22546f279534 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