From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE79EC43331 for ; Mon, 11 Nov 2019 20:44:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C123120659 for ; Mon, 11 Nov 2019 20:44:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573505047; bh=4lIQrmRhHr3b3c2e8onwB0BZvgQoV+M/N2xV16p4TXc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=bM9ycaAlxkXd41JOpvAHEg9Gb39ei2bYHuS21cKKISzb/+WXY4DCk2jt8AjN4DCGJ JOBuli9n1ls81+f7pcGo2JYLSs51RAV0gbdAQHC7wT3WdKiqXNJ6jb8Acyyw3Ly8R3 jDHbwGA3UDQ4JhOYobkA8SNl4sEOu25Gt0j84rrE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727040AbfKKUoH (ORCPT ); Mon, 11 Nov 2019 15:44:07 -0500 Received: from mail-lf1-f48.google.com ([209.85.167.48]:35462 "EHLO mail-lf1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726964AbfKKUoG (ORCPT ); Mon, 11 Nov 2019 15:44:06 -0500 Received: by mail-lf1-f48.google.com with SMTP id y6so10943252lfj.2 for ; Mon, 11 Nov 2019 12:44:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GRpKFfWznVhj0rOmApAqWtyU5VUj2Sa8IVNQNnpT9os=; b=HWedAvPLYel4dWRGlAl6RaJ3Yu3or3ICRF5dcXJUzKCmWReTCRRVOKzRS6Z3LxfDIr l0e8MYVVHvCHAhgsOsOTZcnm+wKkf9HPI9/P3cBWrjFgw3bENmYWUazQx+bSFZG4Gm6Z d/PZrJ7ylSByQPRbgQv5LTVX8eUcGbMpV4Ke4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GRpKFfWznVhj0rOmApAqWtyU5VUj2Sa8IVNQNnpT9os=; b=n/FLTVomUtsd6HWf+/CtFZyAPQfu6+2D8ef70n/y9HfSUxkCqknL4xxf+QHu7RgLR9 PXvNSkjSe7eeafk3jtYGwm7N8Fn8nGvsUh3PDG8yLZrEyQnJ3BLLKMNvmNufaXeM/7ae 2KKIWxpOFRNNwM0zuxaa2TKPf6wgauG/aNnSPQjroFanbsCLI3fpyQ5mv1RjNBJHnled l358e9CXLgrFgQR8HDonU2ANs1rOH2Ehtd8d2TEwwN39ES1LfOJxjBDQRY5JRVt5IqC6 8zZJi7TSDYPbOmotlg6kYqoDi5EsLOF2OBUw2x0M/d01j0lCTipBjGNlu2ecAAG3Joet QluQ== X-Gm-Message-State: APjAAAWX10QuVYV2nahX1NaKRbHENQLJiozghfcw+YnHC07LTFrNxYsG wVGz/EqXaLbn7PDsox8prrEVxBlPpy4= X-Google-Smtp-Source: APXvYqwHVe8eVLoOtZCFwWR6tnFrsPlloOnBcXvFMXY+tmYu/l9stmN5PQ+7nW+Hgh45db/yJ/hyKQ== X-Received: by 2002:a19:8a42:: with SMTP id m63mr3005319lfd.168.1573505043789; Mon, 11 Nov 2019 12:44:03 -0800 (PST) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id 77sm6486595lfj.67.2019.11.11.12.44.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Nov 2019 12:44:02 -0800 (PST) Received: by mail-lj1-f180.google.com with SMTP id k15so15293677lja.3 for ; Mon, 11 Nov 2019 12:44:02 -0800 (PST) X-Received: by 2002:a2e:8919:: with SMTP id d25mr17557153lji.97.1573505041971; Mon, 11 Nov 2019 12:44:01 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Mon, 11 Nov 2019 12:43:45 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: KCSAN: data-race in __alloc_file / __alloc_file To: Eric Dumazet Cc: Alan Stern , Marco Elver , Eric Dumazet , syzbot , linux-fsdevel , Linux Kernel Mailing List , syzkaller-bugs , Al Viro , Andrea Parri , "Paul E. McKenney" , LKMM Maintainers -- Akira Yokosawa Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Nov 11, 2019 at 11:13 AM Eric Dumazet wrote: > > What about this other one, it looks like multiple threads can > manipulate tsk->min_flt++; at the same time in faultin_page() Yeah, maybe we could have some model for marking "this is statistics, doesn't need to be exact". > Should we not care, or should we mirror min_flt with a second > atomic_long_t, or simply convert min_flt to atomic_long_t ? Definitely not make it atomic. Those are expensive, and there's no point. Linus