Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4970731imu; Tue, 15 Jan 2019 08:59:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN4KKkWI3dYDMcSOQCEyhE61G2r+PhKgtOrPlw7h22dyYy0XwtPJKt0OFGai/S4lpcrePJT1 X-Received: by 2002:a17:902:4601:: with SMTP id o1mr5023561pld.243.1547571585819; Tue, 15 Jan 2019 08:59:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547571585; cv=none; d=google.com; s=arc-20160816; b=kCdHV4khQx3lsvMVP3pUJY6Xa53e9LS/9rfKFFLn1lSJniSnz5ZGtOH3p5spbB17Gx /xN55wN+86j02tr2YStgvpSu3Vi3VAV9B+KLYbVLq19QOTpdQb/8uAt0ZZvt6bXkxmPG 3eJMBRWab/dwB9yzhdCYaxrtePqDNi/uywxf0zwJmLmIRO7gua8As89SKjCJ82u5mSEU 8QbNRp0iTDGAAsOrVZdb+VES2i0FO6xIa25Z0Ym6VC3T3RHKaINVY7w995AJ1qOJwdXb jUm/Fm4Bc0EyKnxe3ZYxTGq0damA3EnBuA4mANp4IVHyrgzBVKwNykE8L0xz88ibVDKQ VJCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=A1dD89673PoBZ7pfSVdIgpAHEjIe60zJwiWAIBMKfSM=; b=KX4wlCstegIJR4v4w49a81fcaHoqAFgGuB/h6NQE9yr3UTlvPxMnfb1jEHDpUkVVjf hGBznyVMa9csJ+ewc0hWpp+3UnH2NjuheoI3/6h7ZEGlh2XF3YLXBv/r0Hg7CfHJ5SGC YAMrGZ7MK7nf0muVa0vsZDe992GxgpHoIpsscGYgLf8J7CfoSUyUyruIbphn5gM8jwo2 6AryD3fllpBhNnOfZ4/y6hshZdcLgghej21jRXWyFzWLAEFbHQRFhKPMDiSNfSsnmJXv QPG3MQhSCmWTU95I+DsTwTJAJMe30oh8qA3Sjpb1eR85FBGFf+fCsnDYmpGtNRyDJfoO m1tg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f16si3773562pgb.140.2019.01.15.08.59.28; Tue, 15 Jan 2019 08:59:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731077AbfAOQFR (ORCPT + 99 others); Tue, 15 Jan 2019 11:05:17 -0500 Received: from relay.sw.ru ([185.231.240.75]:51022 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727741AbfAOQFR (ORCPT ); Tue, 15 Jan 2019 11:05:17 -0500 Received: from [172.16.25.169] by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1gjRDF-00047o-WF; Tue, 15 Jan 2019 19:05:14 +0300 Subject: Re: [PATCH 1/2] fuse: Fix race in fuse_writepage_in_flight() To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <154322517208.18737.3297786654135648324.stgit@localhost.localdomain> <00b1782a-5c5c-5bc8-7ea9-4f8450679fa1@virtuozzo.com> From: Kirill Tkhai Message-ID: <66761b4e-dcdb-1a73-ceca-0eebebaaa289@virtuozzo.com> Date: Tue, 15 Jan 2019 19:05:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15.01.2019 19:03, Miklos Szeredi wrote: > On Tue, Jan 15, 2019 at 4:55 PM Kirill Tkhai wrote: >> >> On 15.01.2019 18:37, Miklos Szeredi wrote: >>> On Thu, Jan 10, 2019 at 12:03 PM Kirill Tkhai wrote: >>>> >>>> On 10.01.2019 14:00, Miklos Szeredi wrote: >>>>> On Thu, Jan 10, 2019 at 11:48 AM Kirill Tkhai wrote: >>>>>> >>>>>> Hi, Miklos, >>>>>> >>>>>> any comments about this? >>>>> >>>>> Is there a reproducer? ISTR that fsx-linux with mmaps enabled was >>>>> good for stressing the writeback_cache code. >>>> >>>> There is no a reproducer, since I found that by eyes during preparation of another patchset. >>> >>> That's good. It would even better to have a reproducer, but it >>> doesn't look easy... >>> >>> Completely redid this and reordered the patchset so this change is >>> made before the locking changes actually introduce the bug. >> >> Hm, I meant that I found this during preparation of the patchset, >> but not that fi->lock patchset introduces the bug. I don't think >> the patchset is involved: >> >> 1)before we had race, because different locks fc->lock and fiq->waitq.lock >> are taken in fuse_dev_read() and fuse_writepage_in_flight(); >> 2)after we have the same race, and the locks are fi->lock and fiq->waitq.lock. > > Ah, so the race was introduced earlier, when fiq->waitq.lock was split > out from fc->lock. Yeah, and there was another performer, not me :)