From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFCE9C433FF for ; Fri, 2 Aug 2019 09:37:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AAC7620880 for ; Fri, 2 Aug 2019 09:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564738656; bh=0FbBd3pyZ7Y+Bj0onaTvlclQ+qfFsVs8zuceAJnrOYo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=s8e3Hw9yloPf+uKyYqHERQj5CesM2u77K4cpC3BwaKhaWZxvXRVoXeBCmMkyscQyW 5eBhqLEwFyA/FeXSpTcTVWJS5thw2qoceoOjatIMlxKwOXDth8oCOYOzFNisk5o5s3 58JNwJPEdIZqRExBeo5cU5oJaVHEnJSQ/83wL30I= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403963AbfHBJfs (ORCPT ); Fri, 2 Aug 2019 05:35:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:36388 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403872AbfHBJfq (ORCPT ); Fri, 2 Aug 2019 05:35:46 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B8BED21773; Fri, 2 Aug 2019 09:35:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564738545; bh=0FbBd3pyZ7Y+Bj0onaTvlclQ+qfFsVs8zuceAJnrOYo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C0AgN/Dg/mCXGXJzKZod4zigASZVPtmndzko+7clE72pndD1B8rF3+FTiJ2sei7cV ZnVSj1nUd0VJ1I0EAq+C3UxFFF0HLudGb2a2P9+FMS7Dpx1VaUpLFZv0Q1pUPra/Uy adXMkCwJM9Cvrr2syrDQk0yg3uxeW5pA/Cz8h8Hw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Numfor Mbiziwo-Tiapo , Alexander Shishkin , Ian Rogers , Jiri Olsa , Mark Drayton , Namhyung Kim , Peter Zijlstra , Song Liu , Stephane Eranian , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 4.4 129/158] perf test mmap-thread-lookup: Initialize variable to suppress memory sanitizer warning Date: Fri, 2 Aug 2019 11:29:10 +0200 Message-Id: <20190802092229.709204067@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092203.671944552@linuxfoundation.org> References: <20190802092203.671944552@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 4e4cf62b37da5ff45c904a3acf242ab29ed5881d ] Running the 'perf test' command after building perf with a memory sanitizer causes a warning that says: WARNING: MemorySanitizer: use-of-uninitialized-value... in mmap-thread-lookup.c Initializing the go variable to 0 silences this harmless warning. Committer warning: This was harmless, just a simple test writing whatever was at that sizeof(int) memory area just to signal another thread blocked reading that file created with pipe(). Initialize it tho so that we don't get this warning. Signed-off-by: Numfor Mbiziwo-Tiapo Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Drayton Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20190702173716.181223-1-nums@google.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/tests/mmap-thread-lookup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/mmap-thread-lookup.c b/tools/perf/tests/mmap-thread-lookup.c index 145050e2e544..195ba31e2f35 100644 --- a/tools/perf/tests/mmap-thread-lookup.c +++ b/tools/perf/tests/mmap-thread-lookup.c @@ -49,7 +49,7 @@ static void *thread_fn(void *arg) { struct thread_data *td = arg; ssize_t ret; - int go; + int go = 0; if (thread_init(td)) return NULL; -- 2.20.1