Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp66607lqo; Tue, 7 May 2024 12:17:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVA+xgVclGgn4PRBGheMa9FYiLs1mASEZlIYEixjXRfr4rXxPHe5uTlwzpHlBHtFQwA1Gvg7VsWV3cSoGnKg6spL99Y8MJTki8UAFa7Uw== X-Google-Smtp-Source: AGHT+IEcmx7AqNI0daWEjHdAFKlODE+rY6G6rR6TC+Dm4A9Vl/m0YoUNHris/ptBnZd2QwPo1nP2 X-Received: by 2002:a17:906:d295:b0:a59:a85c:a5ca with SMTP id a640c23a62f3a-a59fa863e37mr58049566b.7.1715109466728; Tue, 07 May 2024 12:17:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715109466; cv=pass; d=google.com; s=arc-20160816; b=pmOybd98ILhIU6t+4Eb4Gc+aOnyxRsMdfyxR1Ec5nLCOK4UwHAlnx3e98KmUePrnLt mSjybE30XuCRYG+DLwHQj17UOaETNGHxqQoucDNcXtzBVnyhi4ET4Jnaja/sYK0tp/db rWlmovodOfsnNHB60NTCf68pMmftfEd0FG0R8ULqjSJcBqnIH/XjSrKeE8HH2hsOnSfv N95SMrgPJaeETbu5fr+4C/pdlr7jNRBOmMwV6LnoZBz5ojGnA3QyU2FDoFzqgZ4fJ2jh 6hYQlZk5A1SSdvIp9hqHJIGqT3JPTTIv581ks0hxPG3Vgl+bpAPZYM2zDqz6CoQTP5jG bLNQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:subject :references:in-reply-to:cc:to:from:dkim-signature; bh=KJ05ivw5+rga7TzuAAcMhvPRoPZ5bNll4/XJScG7k8Q=; fh=k7eKcosk6IG0ZhjFeOS5cynPeGaUDf5N8FaVBuxbHnk=; b=xbyaUR1DF3WhTnBl/4mc6hXoy+y8kakcCl1Lx1JdPYlxO96zW1bWzN7Rts7MN8iUVb 4UyAMAMrbPglQzAuzJ6lk2jl3bXJ8hvVz4VZ3dVsCvzTZl4j4rb1/2vm14PuytmpHdlD UGKtuiPuvvR4XPeYGX//bPHFS7YUAIDZvYBOE+OsVsZ/QsSKFCrmHkBFApCSSaLoabi8 RGc2oCrYv2aiQyIrW5NHbGRBSm0pvCPcwQYCHTOTs6KGOF/LNnuxPjffb11KOtNsJnW5 VOh1xdKNy4ns7fqeEbkrdeQAXAyg6UY+Vr+poz1zPony6IIOmoCH2//sqc6qGJ/3nAJa oFjg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=ITl7Ivsl; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-172049-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172049-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id dv26-20020a170906b81a00b00a59c327e0d4si3039903ejb.970.2024.05.07.12.17.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 12:17:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172049-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=ITl7Ivsl; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-172049-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172049-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 76BEB1F24D1C for ; Tue, 7 May 2024 19:17:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E8ED16DEB3; Tue, 7 May 2024 19:17:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="ITl7Ivsl" Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2B7B73505 for ; Tue, 7 May 2024 19:17:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715109459; cv=none; b=XzyllWgOw+YwXNrXOL7cdGEB/3bEQVdQwvY7etMdQAPli7iKzceUi56rQrn50oXobLuN9xpqdIoWCNCSEJ1gRyN6lj1Z2sa6oS3JhJZlNGCUqvK45oicL8r/u+Uv+p4tSFEDUX5dpsPHUNoaamtTf/PExK8AmZ4UtvRD6gsULcw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715109459; c=relaxed/simple; bh=lFe6PLJLyMEdG0qUciQpwpKkHPkogNZMbmqjjed+jG0=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=mOSlFFzAxixh6+b97MageAVxevJDYE3NhgdfWIIn+8IrJDz8XqZxbVPpOXSC7iDPMA8678Ot5TEIiDoigEaLxUHzbKCGxZGUeHzNjDiFFec7t2ULP382gOGxigxRm4Tmc2oZgxTlVfl/NJExIYVUKu/ydl7KLgF1OnJfg0312as= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=ITl7Ivsl; arc=none smtp.client-ip=209.85.215.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-61c13ed9938so161931a12.1 for ; Tue, 07 May 2024 12:17:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1715109456; x=1715714256; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KJ05ivw5+rga7TzuAAcMhvPRoPZ5bNll4/XJScG7k8Q=; b=ITl7Ivsl7q+QAotXe5SCjBIwgmdGhb/2EbdkzwOROHjp+w9McG/c9Zd0BRfd8MUFGg tY0wpfAU3BtHZE4qCL+C+ZjgFCxDSN9DASuK/VprTGtc8ixqKuXvcEPr3y6n/rxC6fxB l5YDr3v4bIGgyoqdyWFp1xRa2PLxwHiK7tUp4i85jgJhjMtWOX+r3qn/2MDRxt5RrSGe dlqGjs+aDX/SKcOqm6ee2EXLDH9IQAURut2DRKf4TyyLNy2mlcNeApcWLIlPAOsoHdsd 2nWZGDnxhuP6p0LdINd4yUxvDjULjnrlIaSbnrUlcy3+3tciQKj9/Aeenb884xES06Fy iFRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715109456; x=1715714256; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KJ05ivw5+rga7TzuAAcMhvPRoPZ5bNll4/XJScG7k8Q=; b=PN5nYqe9hoM08ZlNkokkl0LPgteWtRyUVbMhY12x7EyaSqTlRz6vmXIrQY//GrUkOx q56t0k8VpCgYzqLcSkVCn3rpjUQdDt8/Jd61HD4UTfbMUlJYaBMbOe3c/txqOOOjL/Hs v6IF02I3uJMiUILm7YepQrmk03T1Lm09zf+WyPYVjbU3glgq2tNDRFdIcJBxDUp+Ni+p aqJtdXncQOrRNoBZ7Ke1HSGDSEYkcXHBNMw3wMKUm9fHSpaxeoRjf0BqdTZ5BfMC/dLg hTestlCHN++XqRts+gxK1+EOMDI+/pV6FSMYnIP/LIBgE2ylGXb6IU0cuWUJ94PLGZRH T+8Q== X-Forwarded-Encrypted: i=1; AJvYcCWPKhscytG2Trnk+qxZK4s9DF9d7dqesv47RQ/aeUrIP05/2gjfo8AVeQVk3ZnCORur9YlJAYIhccQRDxiwZDCSspKhMAfeDX7kIXyO X-Gm-Message-State: AOJu0Yy50KRx5QdTEO6dpxPAUtb+jw91ajbaAzrS3uv+YIT1KnmISPD3 8Oh6nQJ9ELNE5MGkyGMEskaT+tu6ef0xHbRFxVpfsqkxspgRHUigXrslHq7TQLc= X-Received: by 2002:a05:6a21:3392:b0:1af:acda:979d with SMTP id adf61e73a8af0-1afc8d516femr758154637.1.1715109456056; Tue, 07 May 2024 12:17:36 -0700 (PDT) Received: from [127.0.0.1] ([198.8.77.194]) by smtp.gmail.com with ESMTPSA id z68-20020a636547000000b005fd74e632f0sm10126797pgb.38.2024.05.07.12.17.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 12:17:35 -0700 (PDT) From: Jens Axboe To: Pavel Begunkov , Breno Leitao Cc: christophe.jaillet@wanadoo.fr, paulmck@kernel.org, io-uring@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240507170002.2269003-1-leitao@debian.org> References: <20240507170002.2269003-1-leitao@debian.org> Subject: Re: [PATCH v3] io_uring/io-wq: Use set_bit() and test_bit() at worker->flags Message-Id: <171510945496.45805.5070549169318056486.b4-ty@kernel.dk> Date: Tue, 07 May 2024 13:17:34 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12.5-dev-2aabd On Tue, 07 May 2024 10:00:01 -0700, Breno Leitao wrote: > Utilize set_bit() and test_bit() on worker->flags within io_uring/io-wq > to address potential data races. > > The structure io_worker->flags may be accessed through various data > paths, leading to concurrency issues. When KCSAN is enabled, it reveals > data races occurring in io_worker_handle_work and > io_wq_activate_free_worker functions. > > [...] Applied, thanks! [1/1] io_uring/io-wq: Use set_bit() and test_bit() at worker->flags commit: 8a565304927fbd28c9f028c492b5c1714002cbab Best regards, -- Jens Axboe