From patchwork Tue Jan 24 12:58:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 47699 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2142657wrn; Tue, 24 Jan 2023 05:17:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXvaOindaX5kXTb5qrBW/LfuiATUckqDBjHH+cg80PQAvNQlO65YCttz4TLvCLTW+udIwQF6 X-Received: by 2002:a17:906:80d:b0:870:d15a:c2e0 with SMTP id e13-20020a170906080d00b00870d15ac2e0mr29846181ejd.51.1674566251751; Tue, 24 Jan 2023 05:17:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674566251; cv=none; d=google.com; s=arc-20160816; b=nuXivx2SG46euMp/04YNHwshbWet3KMOfKdN2stxkG+6n71nYNsKklaFuNFwIVbCr3 PMvx1/8E1YL/UNB8qN89IZ/ojI9dqHQawY71xI0w33ujHr3/VfNQOJlkbX+5epFyG7sw gVcAMdKgtEh5f3V/xTMbigYbYom42QuMDoje6n0/dWHOdU4UgHzZlrnfZybPysmlZOw7 bdjwtawyvpuBE+dDxebQgm2/IAv2cW5nsgcCC6iQ10f7CYAN25t9YzyWFUVcCX14QM4Z 9+6WBEH27DtaZK6gYBhXTj+PZxO5R7pveob2OEK/FlZB7Y35Jnk/LSTcv0PkLvdys4b3 MYAg== 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=ZSi6S+muZGTgBwtIdsJ5fCvNBIzBTV5J3NQ7wnrMIF8=; b=GBundPxPblIPsf+JkV7WjwK4efD6pLOLfFP1/1bip9f0wpd9LhZeIbsIBdwm+3tgxb W4U2N/d2PRBG053Zv1R0xOBnJVbAln3PYjO1xWZqasl0yeEzkOmtE0ikwJ7BZxzbCO4F 6dWFdRkl6sI4qZFzV6D682bwz9ave2KzrAaNCmc9lV0ypNNeLtEz9s5Pz9ioyIyZTt/P 6LULCboyAGJCxitO+0Wo0nnJv+477uY/OfQPnM/gZ6kkbL7SZcH4Eu2OmNk09bZfp3h7 WybB38wrk3C6QiCPHk9C/grOPxN+48ZHO90AJrWvc/6fOTQ6FV3N6pPX50OvUJKZ/ChE b/8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TFmHdcpe; 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=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fn17-20020a1709069d1100b0078c3197bf86si2308934ejc.533.2023.01.24.05.17.07; Tue, 24 Jan 2023 05:17:31 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=TFmHdcpe; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233736AbjAXM7f (ORCPT + 99 others); Tue, 24 Jan 2023 07:59:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233119AbjAXM7d (ORCPT ); Tue, 24 Jan 2023 07:59:33 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 300DC42BD2 for ; Tue, 24 Jan 2023 04:58:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674565098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ZSi6S+muZGTgBwtIdsJ5fCvNBIzBTV5J3NQ7wnrMIF8=; b=TFmHdcpenNEKi4Fl/mEdv4jzvXsPXciXZ/565PdS4yzowAhlcfKRQgeM/PLgZlXtDpGq0l NUyjw3mXTqKoGBVNqUWtxrkpOC4ZWAzY8RR/kAuJi4czk/O3US4DwoI78w/nHD1FOqXHqv a8m/vbv5FqDnP/C7aGkxzkSmTE+2RQY= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-153-weAzCEXCOHmG9XVJtf0iMw-1; Tue, 24 Jan 2023 07:58:17 -0500 X-MC-Unique: weAzCEXCOHmG9XVJtf0iMw-1 Received: by mail-qv1-f71.google.com with SMTP id r10-20020ad4522a000000b004d28fcbfe17so7501409qvq.4 for ; Tue, 24 Jan 2023 04:58:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=ZSi6S+muZGTgBwtIdsJ5fCvNBIzBTV5J3NQ7wnrMIF8=; b=Pl9SoFhX7b7An5/92LMVCURjthEp5PfDhl01rv+s3PysC9sL2ANPxCeCkUrDNbeQIA Rfri7qKLznsK1kFv6NznUS0QVBqAZDWSWwYkJdbYCHe0oY6bwRspAQLC4okZ+o5gch6s 4mdBquSSWZTWyf3kGNJSThIyaRQlwp0dUW+O4YNdCWoX7WpGN519OIVLZqZ0tqwjqMx2 9vaxDMggd8xqRwseUjqTiA9ofoToLa+JZ35UIW4vOe0uzr0yeuF6hQ1bFcO/dWrZJFH4 oMTqKJODoyLP+O1mIRWg/rx6W7/2KoZzdEy1RWSoGLCBKg1sXVn+ZyJ1J9BVFRcVoqde 4k3A== X-Gm-Message-State: AFqh2ko2NmN6IJl6gCdiw3ZRLAYt7xpUhg92CkpIlXzdQt6pLVUFGrDj gn4Gxusd4c+Zny8nX61byzvUwcsq/wd5mayRMQxCJ7pYvX2D4zNKhvd3+dbT/38Ip0qYlJ3UEsj GAUqY3gdFaRlq6VhXmE0TX/ES X-Received: by 2002:ac8:7350:0:b0:3b6:90c4:b13a with SMTP id q16-20020ac87350000000b003b690c4b13amr27608078qtp.58.1674565096640; Tue, 24 Jan 2023 04:58:16 -0800 (PST) X-Received: by 2002:ac8:7350:0:b0:3b6:90c4:b13a with SMTP id q16-20020ac87350000000b003b690c4b13amr27608059qtp.58.1674565096385; Tue, 24 Jan 2023 04:58:16 -0800 (PST) Received: from localhost.localdomain.com (024-205-208-113.res.spectrum.com. [24.205.208.113]) by smtp.gmail.com with ESMTPSA id r22-20020ac87ef6000000b003ab7aee56a0sm1192570qtc.39.2023.01.24.04.58.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 04:58:16 -0800 (PST) From: Tom Rix To: axboe@kernel.dk, asml.silence@gmail.com, nathan@kernel.org, ndesaulniers@google.com Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Tom Rix Subject: [PATCH] io_uring: initialize count variable to 0 Date: Tue, 24 Jan 2023 04:58:05 -0800 Message-Id: <20230124125805.630359-1-trix@redhat.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755909981917601283?= X-GMAIL-MSGID: =?utf-8?q?1755909981917601283?= The clang build fails with io_uring/io_uring.c:1240:3: error: variable 'count' is uninitialized when used here [-Werror,-Wuninitialized] count += handle_tw_list(node, &ctx, &uring_locked, &fake); ^~~~~ The commit listed in the fixes: removed the initialization of count. Fixes: b5b57128d0cd ("io_uring: refactor tctx_task_work") Signed-off-by: Tom Rix --- io_uring/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 734d074cdd94..4cb409ae9840 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1227,7 +1227,7 @@ void tctx_task_work(struct callback_head *cb) struct llist_node fake = {}; struct llist_node *node; unsigned int loops = 0; - unsigned int count; + unsigned int count = 0; if (unlikely(current->flags & PF_EXITING)) { io_fallback_tw(tctx);