Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5037541imu; Tue, 15 Jan 2019 10:04:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN644xqXAtwf6U1Ioqtqb6khd4a5wOxvrYOcqU17TyBRMz/GDMkHtojPG/JJDcE8o6y0MfFC X-Received: by 2002:a62:509b:: with SMTP id g27mr5326997pfj.48.1547575485457; Tue, 15 Jan 2019 10:04:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547575485; cv=none; d=google.com; s=arc-20160816; b=XyYAQR6RQyjFuJSGavuP3tR2CGYBF+pXm6KRzVxXo2U3qYPZHj/xhbJrk2dBqewf5Q eZunHgM+dLjKATMSF0yywgkZi82Ey3sETSnPvF/UvHcFewmQeZN0rk+CQwrA+9ejVk// jhuRJFwtvuMgrLWshfdNf9c+oGIfLCsqrIza6J9F2dACLf2a9t47DvaQtFLImbnCJKs1 Y7zVEODic7Bmq1jJnMXgKrouxHff6yfE/g2UVPRumGzncXIqRdNo+FHq2C4OJ6zhVLyy agxusaT6i5OAVQQs20wAXjk4ved/+VRLe29/pwB1wDLDr9gFFAFLaQKuJkaMn5QtZmPO T2gQ== 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=AAAzG0s/XGYR7WhWLgbcQ4yTMjavdzPpaBPuHMfJNFk=; b=WjWJS5jNbt3OEQIIecLJHwuXyfPZVMwhPytLxc7wXf9sMivNqh1F8rw9u8WbGpnRJV y5EB1jFfpDMGeDUxnctn3H+FuxAKs8a20vMGyGeOktXm+9RqcIHFA+dVZV/DmB/2CBZs zHtnyASzX9QGdWNmYVWf7TMz52VdBuRx5ad7Hfx+ZMkXuI0Se1zoBSbOFQZDLhSRPniU a735lAg8qWeaa5vHvqKeYEW+9kvNuY7uNclbjqIaiXLlC7wOcNn5j0xe7ia6fvFgzxdW d//lvgE/aVvNdSXo2ajcevW/FbD7gsh+upVjB0CAIccpU/rdfFLFvERZgBYw9K2w3Ev5 lSPQ== 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 b34si3804559pld.305.2019.01.15.10.04.26; Tue, 15 Jan 2019 10:04: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 S1731274AbfAOPz0 (ORCPT + 99 others); Tue, 15 Jan 2019 10:55:26 -0500 Received: from relay.sw.ru ([185.231.240.75]:50466 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729472AbfAOPz0 (ORCPT ); Tue, 15 Jan 2019 10:55:26 -0500 Received: from [172.16.25.169] by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1gjR3i-00041B-PT; Tue, 15 Jan 2019 18:55:22 +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: Date: Tue, 15 Jan 2019 18:55:21 +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 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. >See fuse.git#for-next. The renewed patch looks correct for me. Thanks, Kirill