Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp458756rwr; Wed, 3 May 2023 00:53:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6UVV5tzFSMGqJtACaFjvE5dt+NEH99jrACsFa+OMPU1yv5zHj09WgS/8sPkyf+ML3cCXEB X-Received: by 2002:a05:6a20:7490:b0:f0:fa9b:d4c7 with SMTP id p16-20020a056a20749000b000f0fa9bd4c7mr26845955pzd.55.1683100431124; Wed, 03 May 2023 00:53:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683100431; cv=none; d=google.com; s=arc-20160816; b=zsiQgY0PIb7XnljXz3uVKOWkWmyygmGhre/r0/YCQ2EciYIcLcbf85lazycuP9KuLT gOi1DRHZV8KsKj1/wj/KjjA5R+1PA2hym6ErmMgA4Y28Li82yVf2qilBLlgtKDAhfg2Q wpA8jLtiAe7oWoYfVKED+BUEU7QHKe8D5oDra00Ao301ZZ/+Gp8bxbRX31EYHA/i/YS0 kFtbKOWIhFJAd+nOcbEy3GITxeo2PszZO7MsLmsvs59F+JNLSMLrb3VVc+V8PGTzlHWq NrTLnScwN9NrDGW3UodPnvTfzpXWCgEk8qUIviORzbi1z2Er70+WApjd/DhlCTZ1NQZV v5sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=1Jr6SQdK7M5acrT1P40JH2SkrtTm7xWnHTF1Ugx2KeU=; b=mQzyFuCHGzzoJxBgeiVFszK4+cxqwKMdOFDNEZUNp896RTOSCaclhzH1JeN6HQqsti F4+78SwgllZFKo46zDQHytw4Q5xLu4/0X1NvHa15GNI3l4yP1t7uFpi3pOhIsFizlKas k4fmpC0LHliG7J92/Xeu/V7h5MRahdoTFVoxgmPL1PKkl9AV0h3o7aGrD/Fwmg2/VBes EDoy8ZKEcgLNEjms7MwfBcD4ehd7Hc9VP+/KGpoKhJFRiLsuhCZraFXiI0ipAFiLp80A 5+csEeLsU5Pbk/mXkNkP2arwCjriKQWyGjI/VML7PWgCoxKlxVNvysCIUTKZ4wzu3f5h /oYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codewreck.org header.s=2 header.b=W4N9wVWM; dkim=pass header.i=@codewreck.org header.s=2 header.b=U5F1hQdm; 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=codewreck.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a3-20020a63e843000000b0051ba9b9c3f3si28543916pgk.321.2023.05.03.00.53.36; Wed, 03 May 2023 00:53: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=@codewreck.org header.s=2 header.b=W4N9wVWM; dkim=pass header.i=@codewreck.org header.s=2 header.b=U5F1hQdm; 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=codewreck.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229821AbjECHuE (ORCPT + 99 others); Wed, 3 May 2023 03:50:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229799AbjECHuB (ORCPT ); Wed, 3 May 2023 03:50:01 -0400 Received: from nautica.notk.org (ipv6.notk.org [IPv6:2001:41d0:1:7a93::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA1C42120; Wed, 3 May 2023 00:49:59 -0700 (PDT) Received: by nautica.notk.org (Postfix, from userid 108) id 56CD6C020; Wed, 3 May 2023 09:49:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1683100198; bh=1Jr6SQdK7M5acrT1P40JH2SkrtTm7xWnHTF1Ugx2KeU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=W4N9wVWMI0TNJRmVaZm0QoBKG5yEhDrFZ8sLwmEMRgBUt8C6GgPYs570a4bkSHTqw nJTLRGmmNAsgEwuvya5QO7nNah4VQ7S62Arg7h/Uu7hjSkRwURbOoYwRm4yRwV0/8p ioVKL7sScDR67F09ue5udveu8Zl4NO6sAo1k4met6v/7evU9R8B53jbDaFafbWFJXJ akt65MyknhLc5BRpUuttrHSLya5bU6OTv494v75ZgMJ+vP18iA2bxspPG1Kzk/JSmN WXLcsGK559ZR3PGPFijO3sJ7YkZbEsKWhA6pemPtAfZr6AwHzrFNhHCviJPrQNPIMN SdT4/dYKZjxEw== X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from odin.codewreck.org (localhost [127.0.0.1]) by nautica.notk.org (Postfix) with ESMTPS id D6642C01C; Wed, 3 May 2023 09:49:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1683100197; bh=1Jr6SQdK7M5acrT1P40JH2SkrtTm7xWnHTF1Ugx2KeU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=U5F1hQdmW5ecqDVHupT+OXuCEXwrmJ7mLGKMRUhn+5RZ5qdM0t2ppZsiNIBs7x34n 0t9McldIPzIvHayubcwiej9BZREEEqwqiArHSanQQEKOVoEbtM1D5l2OBOIDNu9jkZ mm1GV8JjjRKarGYoP98Q3oo+E5wVC90oI9bOOEal0sxAnqXzqrf/RTd7TbvrKEapyY O8wfjcfQrn/UZaJcYOavkT7arcTjO3c+DBNytsWfXfZCNAXPI3wI6AO0ePRCPmN+BU WHMCxpgSAz6mTLMsl+PVrIfQjzbfsaoYyqIhrXIK+gcsYxW0h+Xp8HufnN8dvU8V+Q iFe/ifeg3nPEA== Received: from [127.0.0.2] (localhost [::1]) by odin.codewreck.org (OpenSMTPD) with ESMTP id b4109f14; Wed, 3 May 2023 07:49:37 +0000 (UTC) From: Dominique Martinet Date: Wed, 03 May 2023 16:49:27 +0900 Subject: [PATCH v2 3/5] 9p: virtio: make sure 'offs' is initialized in zc_request MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230427-scan-build-v2-3-bb96a6e6a33b@codewreck.org> References: <20230427-scan-build-v2-0-bb96a6e6a33b@codewreck.org> In-Reply-To: <20230427-scan-build-v2-0-bb96a6e6a33b@codewreck.org> To: Eric Van Hensbergen , Latchesar Ionkov , Christian Schoenebeck , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Simon Horman , v9fs@lists.linux.dev, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Dominique Martinet X-Mailer: b4 0.13-dev-f371f X-Developer-Signature: v=1; a=openpgp-sha256; l=1206; i=asmadeus@codewreck.org; h=from:subject:message-id; bh=vhjUjQLTL0bzvtWRoRMBT59Y+F+0DRe8NxWoHtMoq0M=; b=owEBbQKS/ZANAwAIAatOm+xqmOZwAcsmYgBkUhIR1SXh7VwBjG2iq8nQNm0Lx3pG8+75NFVpz u+o++lwu+mJAjMEAAEIAB0WIQT8g9txgG5a3TOhiE6rTpvsapjmcAUCZFISEQAKCRCrTpvsapjm cPQcD/0eNUjIdy/ox9zl2KORjzzu+7EapK/XLxBHOqcUzWal/SWa1I3vmak3k35GueIco9YH5z+ gFH5m5xE5LM5azeCYHW4Aih6wsP/XtUvKW8iDLodfdZbXIkkyC2NOJghoNnDgbodETIGutZJrB1 pRUd1MhakD+HQ9U5JfToISTJ2GnmNss/OxSoP4mbgIPYouzwawXYGPvX4LtNqo0TTndvMFjza4s nUgbLRKcHWbF8lZbLUyEuDfy1QWfFO7FB8MhXEYAaeprfniu2BHDrwCTROJ9DyQtu+uypH6jPM3 HRVjg8LlIbWEQKpDN5aqqc9GpdoWIOHhkMJNfGA7zTDykjhhsX+cnhXjt6nq7iqbRavjmqn7wV7 3OeAUXBm057jV1jbqLlQh0DJpxrTL0y77Obxqrzwbti8LB9RycOUHXSTtS5T8yF+UVG6lwXc5B6 0tnMJpr4Dw2u7/w6apa+9JxJ9OXuVJ+052+HqzQxZF6ZitlbODP+nr047oMYrYRaEt/7Fh2RfXi sbsSM19OmACmMmde2bfDl4tkzThSQvx70E+7HfObBFzKTOoGLGsg9HIuLzBzbq9HuwsTpZUKYrZ cm+YmDCjN4CU1pSlLxxUp1Yx2eKu9YTMR51fkD8tpCzwIzL3xWcVlKrD7x5OwqP3ZUhEW4V2xTI f8b7Zr1sxcSEcsg== X-Developer-Key: i=asmadeus@codewreck.org; a=openpgp; fpr=B894379F662089525B3FB1B9333F1F391BBBB00A Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Similarly to the previous patch: offs can be used in handle_rerrors without initializing on small payloads; in this case handle_rerrors will not use it because of the size check, but it doesn't hurt to make sure it is zero to please scan-build. This fixes the following warning: net/9p/trans_virtio.c:539:3: warning: 3rd function call argument is an uninitialized value [core.CallAndMessage] handle_rerror(req, in_hdr_len, offs, in_pages); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reviewed-by: Simon Horman Signed-off-by: Dominique Martinet --- net/9p/trans_virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 2c9495ccda6b..f3f678289423 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -428,7 +428,7 @@ p9_virtio_zc_request(struct p9_client *client, struct p9_req_t *req, struct page **in_pages = NULL, **out_pages = NULL; struct virtio_chan *chan = client->trans; struct scatterlist *sgs[4]; - size_t offs; + size_t offs = 0; int need_drop = 0; int kicked = 0; -- 2.39.2