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=-8.6 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=ham 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 DC65BC43387 for ; Fri, 11 Jan 2019 10:41:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AC1302177B for ; Fri, 11 Jan 2019 10:41:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="t6jO5Kv2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729734AbfAKKlN (ORCPT ); Fri, 11 Jan 2019 05:41:13 -0500 Received: from mail-it1-f195.google.com ([209.85.166.195]:35404 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbfAKKlM (ORCPT ); Fri, 11 Jan 2019 05:41:12 -0500 Received: by mail-it1-f195.google.com with SMTP id p197so2392722itp.0 for ; Fri, 11 Jan 2019 02:41:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=POobCIeDALwjg4VPWhxJhd81RRESDaJAgDoGG8/Hu4I=; b=t6jO5Kv2P6vSjyB7V2vBjn25EKeeCuiES47vQNcgp4Ubj6i36Uq5JTCGLyaATUkG5S TCPEORiLukKni4Mpmqb10S7DaB6ROHyHhBnPVM3SLAr90W79uY3C5sXsgkCvf0rWgFu2 dtQyS9B+Wv4p60FHwpeR0tlk+D/DFvOHzE3HxoTPlBtWXYx1M+f+beHY59Yo2UJ5odLs qnyUVHCyDfdwoEDbYsUVTuX3494m9jkSkm4mTHilJTKEVZDPKNLd9VXDtDk1yw6eVTOt adT0QELJe2DjV2doBwAoIofymhaQ7detTEYZWZRgjbRkkxFA49iQEA22x+FFNIqDS1Fm HV1g== 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; bh=POobCIeDALwjg4VPWhxJhd81RRESDaJAgDoGG8/Hu4I=; b=UB5Aakm9aKzGIPZed3yn53jVUPEbDpl6w1xca17/zUvEoAfVunJ7dc+ja6CnUafoxm KNm43XwyH+C+LIRaLXGp0t6Qv0il4eJZPXu71GQUgy5VB8sikpNS71KkGYJlqqL9RU0a sgxfsXW1KOFosFa7DBGkf4rpugHFk1kUiLKDkmAoCP0Cn7JoeaeN5gd/k/xwmkzerAjQ IlN+XwHJJ27ZpX5mxRXhIHssHQg8qnRvX+6wT7/JU5da514aqYCQ5V2OZW5agMWU2/T9 o+RulYKtC1ri5CVutofGRPTRW4m3ZlmewBHVAfF0q6uMJ8tULILs9Hbcls2O31PdcGge rw1Q== X-Gm-Message-State: AJcUukeosv2+I/ggXV9HfQ2tDB5IdbwmbeWw7LWfX/+QEA7yv0i39Tf2 L74XIq5viQxTx1hRX/x/PnoQ2jwS4jl5qF41oeP8cw== X-Google-Smtp-Source: ALg8bN6MY5yoeN0hiBnmaM7/XGOlfhhF7tAPVJwQJItk98JXFXAOXN55cz23w+ab0hcEhr9GWobrlOwrpMRH/jgFoMU= X-Received: by 2002:a05:660c:f94:: with SMTP id x20mr690029itl.144.1547203270563; Fri, 11 Jan 2019 02:41:10 -0800 (PST) MIME-Version: 1.0 References: <1547201433-10231-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> <04c6d87c-fc26-b994-3b34-947414984abe@i-love.sakura.ne.jp> In-Reply-To: <04c6d87c-fc26-b994-3b34-947414984abe@i-love.sakura.ne.jp> From: Dmitry Vyukov Date: Fri, 11 Jan 2019 11:40:59 +0100 Message-ID: Subject: Re: [PATCH] fs: ratelimit __find_get_block_slow() failure message. To: Tetsuo Handa , Jan Kara , Al Viro , linux-fsdevel 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 Fri, Jan 11, 2019 at 11:28 AM Tetsuo Handa wrote: > > On 2019/01/11 19:19, Dmitry Vyukov wrote: > >> @@ -200,6 +200,7 @@ void end_buffer_write_sync(struct buffer_head *bh, int uptodate) > >> struct buffer_head *head; > >> struct page *page; > >> int all_mapped = 1; > >> + static unsigned long last; > > > > /\/\/\/\/\/\ > > > > We will have to re-fix this when we start testing with KTSAN, data > > race detector. > > What's wrong? This race is harmless. How did you arrive to the conclusion that it is harmless? There is only one relevant standard covering this, which is the C language standard, and it is very clear on this -- this has Undefined Behavior, that is the same as, for example, reading/writing random pointers. Check out this on how any race that you might think is benign can be badly miscompiled and lead to arbitrary program behavior: https://software.intel.com/en-us/blogs/2013/01/06/benign-data-races-what-could-possibly-go-wrong