Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp369469lqo; Fri, 10 May 2024 02:21:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUfmoJJ3zhdV9hLFedpVKzx9W1nefVYylQSG97jayPZlbbZJf/Cql7agfMaNTKqINfaGxuza9Jb3SYi4iOBO3kmmWneGKJqmQ3YkeaCbw== X-Google-Smtp-Source: AGHT+IHh8VzTa7XtjPEx93KD9/U/qhbzu840Fj0KnSUmbOw40d/eC6ssbA9zcB65eqEmgntbhZQp X-Received: by 2002:a05:6214:450f:b0:6a0:cd6b:4149 with SMTP id 6a1803df08f44-6a168140ee1mr19065346d6.1.1715332900232; Fri, 10 May 2024 02:21:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715332900; cv=pass; d=google.com; s=arc-20160816; b=iTFl/YwWcgsZoaXOEEr4wjWyUWwV476+57Ztn+NBSYbjLxVdei4mSv4JEZLikoWfss Uklzkff3lbmGIE3SVn/T/XmfGAY4mxB0MLLDlEEv9iGTcvRPvaAk3w0e+LH3UXTriEhc pc/6C1BWFJms7nELKtL4yflxdeu7G0BEW67OMHkHah3ioCQGqv5IS1NjNsDX93RhNvUz LLgl4ocDEcrD0wLW8yXjfunXyVfzZaTFQzycaVZQhmu7kW+8vtABSLn10p3Lc1tdzWnx fPCUyuwuljSo8DOC5Qs3LNuM+bZo8J6peS6iKR3julnpyduOfEY5qSi2Y7td7rn/HIXq XsKQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=kc4GbU1nJuP5rf8sWY3kjEhTD6HDa5dyZKuLq3c/7BE=; fh=ztr6xgeBriu4EtrmgqBMDdG3HUxfzeFHRhD16xSKLe0=; b=CElQiqPBqutYFzHdBVkFdEgkv2LCwEWLq3J2P7IY3497NjhwLdcmOb19JBXL/0DJcD qdQirnHAfk2iDtghlvH/HqtLyIVjGXs/zBT02M2gdJqBQARFBcBnH++3HumrOwRNPPzW 4JL/QCE7OY4de5+uGRRMDcrEqH3ZqxwscLtMYnPh+Qz1aXdOi0DZprdNfo7AWaCgfjsR wXm4oS6qB+inA8Squ611i1uTNxHBSVuN9MKU9K+ugfM2mzRLCc7CI/gcVqbaYkntVGL1 X+zUh1/bcQL/q2tupdNDjFG7p4vio3ddMZ73yVU5VeiW4O5PZz4/8eQf37vApDzbcmNq oJ2A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=A3u2ykTA; arc=pass (i=1 spf=pass spfdomain=szeredi.hu dkim=pass dkdomain=szeredi.hu dmarc=pass fromdomain=szeredi.hu); spf=pass (google.com: domain of linux-kernel+bounces-175522-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f2eff69si31770586d6.495.2024.05.10.02.21.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 02:21:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175522-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=A3u2ykTA; arc=pass (i=1 spf=pass spfdomain=szeredi.hu dkim=pass dkdomain=szeredi.hu dmarc=pass fromdomain=szeredi.hu); spf=pass (google.com: domain of linux-kernel+bounces-175522-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EEBB21C221C6 for ; Fri, 10 May 2024 09:21:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD62F15FCE1; Fri, 10 May 2024 09:21:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="A3u2ykTA" Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 71A3B8BE8 for ; Fri, 10 May 2024 09:21:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715332894; cv=none; b=fvWfcEcF94Yg65Ahc8DQxnuZ9OiKpnpVPGHvQB7zH2JuvTpfpExWXiQUiTo8r63QWsmiXVobsjzppjuXDdPZpyrrqUltgcQyNi6BI+gZXOfm5JmLt0PsHvanHsOHlY/iBvLgRkosY12y0Ob5hd6g0l1B7YEuyM3aAgjEmSfFIH8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715332894; c=relaxed/simple; bh=kc4GbU1nJuP5rf8sWY3kjEhTD6HDa5dyZKuLq3c/7BE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=GoYBdecghEPTvOJx8aMfdxq4B/nx+apKb2/kVcix9xaSJXWQuz08O66m1LYWlLxUWCGjDbtVPAsadkPamHOtS2/xkk56UtmqAaPWfkH51kQo/qxkZ2cdlc0J/8Nys/HCQ5fBlQr7yHrKu+BdvT06BpKItuXlyboxwaTn/TlX2pQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szeredi.hu; spf=pass smtp.mailfrom=szeredi.hu; dkim=pass (1024-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b=A3u2ykTA; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szeredi.hu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=szeredi.hu Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a5a2d0d8644so207949666b.1 for ; Fri, 10 May 2024 02:21:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; t=1715332891; x=1715937691; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kc4GbU1nJuP5rf8sWY3kjEhTD6HDa5dyZKuLq3c/7BE=; b=A3u2ykTAyXAyeRKw9MkBuXrG1DJBwEmkSQbKLpEAxx4v2grUnD+TIBjoawonlokfKt 7IPM/f/RbJ4vWA9QfMNa5kewBHgQCS75NObixZ9FMH8UjTF3EyPn6UnGiAVhdaQ1555r 7wgwvof883UPBnOjly7BQLUaaKEWu8//twh+A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715332891; x=1715937691; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kc4GbU1nJuP5rf8sWY3kjEhTD6HDa5dyZKuLq3c/7BE=; b=CVkgH9lYXUMP1+Ldp+c8866LcsY1mu0AeV0Izt88Ah7GcusgR5t2uLiezZR4fiELYr 6ajFUy3hU2CxArasZc0poa4GOO4VKQ0iqU+luPY9PmxbZe1cnDnK4Hg1hT5JYks1xAy3 7QoAKFczBEqUM5J2izAnx/Hg+Npodd02F0pxV3UBGw/2yxlfqG53rXMogHU5gnJH0gBn 8hOU56mtM9tJRBtzRc47DRI43Tnfslk2fRb+aCCZ526xG07pJ5YS5AoeJqpq1x51jspj KpyJ7yq65n5/JFlnaQ0S5miUEfmDUrIubBX3lcKxlXEjNZt5yWphcwDRjAfUeHZ5aWIo UZmw== X-Forwarded-Encrypted: i=1; AJvYcCWqBa5Op5pDAoTknJk60u5HsnxDaSbywyhVI7BGpXkpqvs2rmxOD0LG3vxulOMZFHsUN6H2CHCACbrxt9PYcedPIAHpcf7uxW3IlYPt X-Gm-Message-State: AOJu0YzOFR9Jf+z0SJjZoyyB0RoCM8c0M8B6bDfU8aaLnyz6e8SYGV0d +h4WFMOEWS0Z5svrT8FHEmAPGXfXzJtvXl4b0TSKQcto2NT5TYmo0AJ9BT7rfeDELpFPXbwFBur JtGwIKBqbieatg4kg11vQxlbUCDI/tfDY9Jn9hw== X-Received: by 2002:a17:907:1707:b0:a59:c577:c5cb with SMTP id a640c23a62f3a-a5a2d55a749mr146034566b.10.1715332890702; Fri, 10 May 2024 02:21:30 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240509125716.1268016-1-leitao@debian.org> In-Reply-To: <20240509125716.1268016-1-leitao@debian.org> From: Miklos Szeredi Date: Fri, 10 May 2024 11:21:19 +0200 Message-ID: Subject: Re: [PATCH] fuse: annotate potential data-race in num_background To: Breno Leitao Cc: paulmck@kernel.org, "open list:FUSE: FILESYSTEM IN USERSPACE" , open list Content-Type: text/plain; charset="UTF-8" On Thu, 9 May 2024 at 14:57, Breno Leitao wrote: > Annotated the reader with READ_ONCE() and the writer with WRITE_ONCE() > to avoid such complaint from KCSAN. I'm not sure the write side part is really needed, since the lock is properly protecting against concurrent readers/writers within the locked region. Does KCSAN still complain if you just add the READ_ONCE() to fuse_readahead()? Thanks, Miklos