Message ID | 20230424094730.105313-1-colin.i.king@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2623182vqo; Mon, 24 Apr 2023 02:54:51 -0700 (PDT) X-Google-Smtp-Source: AKy350alAnLG0/rvPvJEc29cp1iM/PjDDYtKlR7kmeBtUyRrzdJ1COwHMrYd1Y3usMVYJjAcPEAX X-Received: by 2002:a05:6a21:6da7:b0:f2:6984:b8d with SMTP id wl39-20020a056a216da700b000f269840b8dmr14127821pzb.29.1682330091345; Mon, 24 Apr 2023 02:54:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682330091; cv=none; d=google.com; s=arc-20160816; b=YXlmA5hKYLXNi68WMSDxKnI/BKSS57dTeRN1jG5jNRLBCc6geV9xk8eV7F3NI9hTNH nC4TV0+mrX353dv8F69EnrAA2mGi5SSmQeL88URsd4c9EE6wX7bpaM5EpJ9SEP8DbZg3 50xONIfCUQJGtDCkxdGjZmkAqXp3dACzh58UvDe5F131lmQ/FPFyknZvWi6Qx0WNWu49 ONUqi+jNPbllPy8WxKjbGVOP4gvuZEylsxPa0EvU/Zql1b1qZBghODTUel6vzjx6UVk0 R7X2ma9c2AvtX7kufs2ZMCf0z0O20COznp8nuaHwkpZALkWgYza9OhucbTS0qEfJI7/k E8Pg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=hZyWIeK34NmrQfsNJdgjh0DC7E3/9QF+r15VrIbQ35Y=; b=dxweMvQhzCd2FPnf4COGrtKO204Q9ufxRDtqnPDZEfiEIPEE9b2RGSSq0/qWyIoNTN 0mtELon3ILRt8/cX0v2BNviSrLrw4nZsgdEZFjKXOU8l8vIfiTZR0R7eJZvOE5/8/8tG Pl6IBy9SAzq3goVZdZCBYcHA3d+XQPowRn9yZimSo6z01T5D0YMkqo/ZyeAicggLgjI2 EK16aR1JzbUA6qYlQZmKxDmOASxSDgebgK3WyiTcYcf/m4cImV7TSf/T/j9cAacA8Ppi IJx9c0ASBL17/17riH4e6lLt9tDXccLi/KpQKpaEj3KkVCjveUp2CVgKgbsg+u/j+jlQ LsKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=KJbIYqls; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b29-20020a631b1d000000b0051f047acf17si9829895pgb.525.2023.04.24.02.54.36; Mon, 24 Apr 2023 02:54:51 -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=@gmail.com header.s=20221208 header.b=KJbIYqls; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231272AbjDXJsC (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Mon, 24 Apr 2023 05:48:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229658AbjDXJry (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Apr 2023 05:47:54 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C16EB3C06; Mon, 24 Apr 2023 02:47:33 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-2fddb442d47so3843059f8f.2; Mon, 24 Apr 2023 02:47:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682329651; x=1684921651; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=hZyWIeK34NmrQfsNJdgjh0DC7E3/9QF+r15VrIbQ35Y=; b=KJbIYqlsYfx76iqy2WImXzJfB72YvSYkFQK1MDqVouVbgj0fftLkRXI08nEQRHmvxI cRcb4SzfR/PgdfvRP0CAVuKSBurfDxrcK7zjy11c9ASPxJjmm/+xI5WhYfJGPhZ1i1lU tsdJzhQZFEtP/TXZWK1lIgE6A2qED43jBQNLiojmm0mfeytglmCwAdNHVQdqUycfDIvN 5K/IekCFk8CHZtNHaWg0v2EUdr45ht22KvL5PkDC5njoxkI5RgeFp/Ufz1ap2gYINeJ1 kaaWXFLzDdtjYyFRbXxZrDIAcaUp8RwAKS9qvhavS6e1D75KVceOGVmFl4Cc3sXFD0QA sDZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682329651; x=1684921651; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hZyWIeK34NmrQfsNJdgjh0DC7E3/9QF+r15VrIbQ35Y=; b=YUPaxG/yBDKkepamAt+fVJmXCqOvHyYsGyuFFgrFoQ6Lejn3hwnNanV/Uhwx1LG+Lc cSJA57PvJH3EneGnKMfAS15Kw/QTlW5vkLF+CKiceVK1w/7dpC7bOblFJnkUDol9UNNx //pZVKnMCpb6FZMrzQghjTigLU3hqlD3SPNXlmoU8+hRHCwf4BfQuu7ZmvNftVde6vbv CgGLuJsSWkrlVwEO/JR2RS0Hru9YCKEdCfIux4TpLAGa6ymsCoAIbIekGFJGBXeyKNL9 JQlMmdLxrIoX/8T8tre++rgSitwioBUs5NSUGMc5gKN7DR1DJGtMvWc0jWd37+H9bU2X NpFQ== X-Gm-Message-State: AAQBX9fiLyB/7YYMmdppXXlQdfubcQjmR1xD1/ipz2yuyMVL5NwaNm3b NHtX7Sv3w/Dva4H0KdcGjn8= X-Received: by 2002:a05:6000:1209:b0:304:6b64:4f30 with SMTP id e9-20020a056000120900b003046b644f30mr4636169wrx.18.1682329651558; Mon, 24 Apr 2023 02:47:31 -0700 (PDT) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id y4-20020adffa44000000b002f013fb708fsm10540320wrr.4.2023.04.24.02.47.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:47:31 -0700 (PDT) From: Colin Ian King <colin.i.king@gmail.com> To: Daniel Bristot de Oliveira <bristot@kernel.org>, Steven Rostedt <rostedt@goodmis.org>, linux-trace-devel@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next][V3] rv: Fix addition on an uninitialized variable 'run' Date: Mon, 24 Apr 2023 10:47:30 +0100 Message-Id: <20230424094730.105313-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764050700777109294?= X-GMAIL-MSGID: =?utf-8?q?1764050957999342989?= |
Series |
[next,V3] rv: Fix addition on an uninitialized variable 'run'
|
|
Commit Message
Colin Ian King
April 24, 2023, 9:47 a.m. UTC
The variable run is not initialized however it is being accumulated
by the return value from the call to ikm_run_monitor. Fix this by
initializing run to zero at the start of the function.
Fixes: 4bc4b131d44c ("rv: Add rv tool")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
V2: Initialize run rather than assign it from return from ikm_run_monitor
V3: Add missing V3 and next in patch subject
---
tools/verification/rv/src/rv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 4/24/23 11:47, Colin Ian King wrote: > The variable run is not initialized however it is being accumulated > by the return value from the call to ikm_run_monitor. Fix this by > initializing run to zero at the start of the function. > > Fixes: 4bc4b131d44c ("rv: Add rv tool") > > Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org> Thanks! -- Daniel
diff --git a/tools/verification/rv/src/rv.c b/tools/verification/rv/src/rv.c index e601cd9c411e..1ddb85532816 100644 --- a/tools/verification/rv/src/rv.c +++ b/tools/verification/rv/src/rv.c @@ -74,7 +74,7 @@ static void rv_list(int argc, char **argv) static void rv_mon(int argc, char **argv) { char *monitor_name; - int i, run; + int i, run = 0; static const char *const usage[] = { "",