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.8 required=3.0 tests=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 1DDA3C432C3 for ; Wed, 13 Nov 2019 21:50:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 22901206EE for ; Wed, 13 Nov 2019 21:50:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727002AbfKMVus (ORCPT ); Wed, 13 Nov 2019 16:50:48 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:41780 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726162AbfKMVus (ORCPT ); Wed, 13 Nov 2019 16:50:48 -0500 Received: (qmail 5977 invoked by uid 2102); 13 Nov 2019 16:50:47 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 13 Nov 2019 16:50:47 -0500 Date: Wed, 13 Nov 2019 16:50:47 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Marco Elver cc: Linus Torvalds , Eric Dumazet , Alexei Starovoitov , Eric Dumazet , syzbot , linux-fsdevel , Linux Kernel Mailing List , syzkaller-bugs , Al Viro , Andrea Parri , "Paul E. McKenney" , LKMM Maintainers -- Akira Yokosawa Subject: Re: KCSAN: data-race in __alloc_file / __alloc_file In-Reply-To: <20191113213336.GA20665@google.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, 13 Nov 2019, Marco Elver wrote: > An expression works fine. The below patch would work with KCSAN, and all > your above examples work. > > Re name: would it make sense to more directly convey the intent? I.e. > "this expression can race, and it's fine that the result is approximate > if it does"? > > My vote would go to something like 'smp_lossy' or 'lossy_race' -- but > don't have a strong preference, and would also be fine with 'data_race'. > Whatever is most legible. Comments? Lossiness isn't really relevant. Things like sticky writes work perfectly well with data races; they don't lose anything. My preference would be for "data_race" or something very similar ("racy"? "race_ok"?). That's the whole point -- we know the operation can be part of a data race and we don't care. Alan Stern