Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp544229pxx; Thu, 29 Oct 2020 08:35:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmhHHHxsRU3Iv8TU2WQZcF46jnDJVgZ5HP+VcOEkrJMSHMH78mE3kMv+dxBYS6vqlOeWfX X-Received: by 2002:a50:b224:: with SMTP id o33mr4380433edd.21.1603985701420; Thu, 29 Oct 2020 08:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603985701; cv=none; d=google.com; s=arc-20160816; b=FtGA1Yl9tL2dUkLDtfsjdk3gIlova/a4yDFca5N5s7AntJSJxrNRoP9pOifs/lMUIB cTGrgFoJVHIAelaJ/dpQE06BCAuETymONGvf9ApWzCTwr674sxr7eQe8d3xX4W1vVmaF qOotZqjCpv5bY2rXGuXlFRpfMHarx7cxgvjw2knYTs1IQ3hz7qsX7BEsvdKty7VfAz3B 8SNm54nvKxtCB7fXfUfl4CdazXrKxyPtx9Gm9V6MkYLXu9EwH1KlD1tBAWHvOazoFGd1 9LjIj0J0TMSjbIoQDzVb8h2rjh98gBM1AHai3/BZKMjE+sZZz+ZxZBaLue7FVwE24Yt5 4zkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=G2vNhDEm3HbJWwlXQvfrqMnwz+Y6hXypKtoqXX91090=; b=HCkgp9TSHK7EtWM+vZq9J2NVj+LD00ijmJ91rjMU8umIatXIPZda5YMDRFy3OAKsWg vLU41/bc0HmOATT5wrkbTFfeZ1CAEh1jDI/Z82SluXHSyl+XfJiOWBd2u7GJValWLi6D B6ndzL6IVrIbZ35P+4noqBLZ9bpvfoNndr/mt7OvEN3hDR5t4tg4wQ2bMNidNYUrGf8E GSCO8ahAnm+PPkn/dtXWyqoOiGLfX4qP83Cq6jTv10t+K+o6v8bA4igFrlU5zV34jWC/ zwHuen9Fmht8uLqMpA3NOaEi+KGVCELltXM4CQVo3czL3fOxjjm8o6fTkS2EfHHdUJYg biWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=ZeVFlYxb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bh4si2633301ejb.421.2020.10.29.08.34.38; Thu, 29 Oct 2020 08:35:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=ZeVFlYxb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728362AbgJ2PbB (ORCPT + 99 others); Thu, 29 Oct 2020 11:31:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728265AbgJ2Pa7 (ORCPT ); Thu, 29 Oct 2020 11:30:59 -0400 Received: from mail-vs1-xe30.google.com (mail-vs1-xe30.google.com [IPv6:2607:f8b0:4864:20::e30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B2ADC0613CF for ; Thu, 29 Oct 2020 08:21:07 -0700 (PDT) Received: by mail-vs1-xe30.google.com with SMTP id y78so1720690vsy.6 for ; Thu, 29 Oct 2020 08:21:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=G2vNhDEm3HbJWwlXQvfrqMnwz+Y6hXypKtoqXX91090=; b=ZeVFlYxbfCuY/CTkTlqJNy9tAAAQX1+083ZdKCIa7x1FWR21+Plm1CPrBsd03fL+a1 9kxhuhqHA5xuykUmXmhTjs+dynTESM5EFHJjUSvzEMHqzuKqmcs6r4xBJiNaMTBnPwr9 M9dts4aQTunZ21ku0hMwe6NKyEo9QpURz2Z28= 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=G2vNhDEm3HbJWwlXQvfrqMnwz+Y6hXypKtoqXX91090=; b=gc77qzZmyeTD7W1W1jJeJL36PGLgccT1F+wR2Q5VJTOiCkQrYQfik1b84qBZNgLRtc 1wjeDUwAyoLSyWPYWI60DTUT0fYynLiD6nyn+2eN3PAxU6rjnstvhMkidZeLezeHtG4i eJZKtDTiRlu8okKd1mnfh57Ukb/qfm4AvmWnEPLixd/CmgqkNXVYzo3iTZSz9Fyj+F94 ynDrTEUesupXqGMVxfNc699al5Z/HgpcAK8PooQ41PZbZexX0yo2GwoowLGKR6P08dQj gctwmAgBZ2IG7iCKPwB0FMHHVJm1ET6Hzc7exxuqTRIjSpLTm5lQDn8XWZcbPzefaYdp OVhQ== X-Gm-Message-State: AOAM5316g1WBx+TFq6lwYlCvbP1RmabzqjeK25r9GDf27CNDvMlk4xpI IRFe6vKXvr5vC+T/RQigVMwsajzLaZR9KIa1d0DDNg== X-Received: by 2002:a67:1442:: with SMTP id 63mr3605467vsu.0.1603984866514; Thu, 29 Oct 2020 08:21:06 -0700 (PDT) MIME-Version: 1.0 References: <89f0dbf6713ebd44ec519425e3a947e71f7aed55.camel@redhat.com> In-Reply-To: <89f0dbf6713ebd44ec519425e3a947e71f7aed55.camel@redhat.com> From: Miklos Szeredi Date: Thu, 29 Oct 2020 16:20:55 +0100 Message-ID: Subject: Re: WARN_ON(fuse_insert_writeback(root, wpa)) in tree_insert() To: Qian Cai Cc: Vivek Goyal , Stefan Hajnoczi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, virtio-fs-list Content-Type: multipart/mixed; boundary="00000000000031f1b005b2d0d437" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000031f1b005b2d0d437 Content-Type: text/plain; charset="UTF-8" On Thu, Oct 29, 2020 at 4:02 PM Qian Cai wrote: > > On Wed, 2020-10-07 at 16:08 -0400, Qian Cai wrote: > > Running some fuzzing by a unprivileged user on virtiofs could trigger the > > warning below. The warning was introduced not long ago by the commit > > c146024ec44c ("fuse: fix warning in tree_insert() and clean up writepage > > insertion"). > > > > From the logs, the last piece of the fuzzing code is: > > > > fgetxattr(fd=426, name=0x7f39a69af000, value=0x7f39a8abf000, size=1) > > I can still reproduce it on today's linux-next. Any idea on how to debug it > further? Can you please try the attached patch? Thanks, Miklos --00000000000031f1b005b2d0d437 Content-Type: text/x-patch; charset="US-ASCII"; name="fuse-launder-page-should-wait-for-page-writeback.patch" Content-Disposition: attachment; filename="fuse-launder-page-should-wait-for-page-writeback.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kguz5cjv0 ZGlmZiAtLWdpdCBhL2ZzL2Z1c2UvZmlsZS5jIGIvZnMvZnVzZS9maWxlLmMKaW5kZXggYzAzMDM0 ZThjMTUyLi40MWIxZTE0ZjM4MjAgMTAwNjQ0Ci0tLSBhL2ZzL2Z1c2UvZmlsZS5jCisrKyBiL2Zz L2Z1c2UvZmlsZS5jCkBAIC0yMjgxLDYgKzIyODEsOSBAQCBzdGF0aWMgaW50IGZ1c2VfbGF1bmRl cl9wYWdlKHN0cnVjdCBwYWdlICpwYWdlKQogCWludCBlcnIgPSAwOwogCWlmIChjbGVhcl9wYWdl X2RpcnR5X2Zvcl9pbyhwYWdlKSkgewogCQlzdHJ1Y3QgaW5vZGUgKmlub2RlID0gcGFnZS0+bWFw cGluZy0+aG9zdDsKKworCQkvKiBTZXJpYWxpemUgd2l0aCBwZW5kaW5nIHdyaXRlYmFjayBmb3Ig dGhlIHNhbWUgcGFnZSAqLworCQlmdXNlX3dhaXRfb25fcGFnZV93cml0ZWJhY2soaW5vZGUsIHBh Z2UtPmluZGV4KTsKIAkJZXJyID0gZnVzZV93cml0ZXBhZ2VfbG9ja2VkKHBhZ2UpOwogCQlpZiAo IWVycikKIAkJCWZ1c2Vfd2FpdF9vbl9wYWdlX3dyaXRlYmFjayhpbm9kZSwgcGFnZS0+aW5kZXgp Owo= --00000000000031f1b005b2d0d437--