Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1235467pxj; Fri, 4 Jun 2021 09:13:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiaQhjg0bDqCU+W62KR7d7CTGMdnQvWyxpBl2zpYQ/4jCA5xB2EPEDJMbQEM7OevvdzY3e X-Received: by 2002:a17:907:2bf9:: with SMTP id gv57mr4894612ejc.189.1622823231886; Fri, 04 Jun 2021 09:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622823231; cv=none; d=google.com; s=arc-20160816; b=fPS2Qqjfz5NTOkkIZQGLG7YMXdDBDyEMTVQkItgcR7zyNcGsoTYyPobh6y1O+jJcRh jyY8j1MEnpZ/q30Sf+Zfbh2sGrEATWkN5IAyt2tXcGwS8OFsjG7tArTjAvQTpMhC+KkB +MPa++TkeAdQS0WniPKTv+81ZzC07eTvo2aE3jSHzCUKcj48kAFTlq2TfSTGXqayWR4A 7jybdoGHhYvG1vHYRBKrhtnxnn03JNohCIoP2Ls1hLGhEuqjrls6SaPXvkbdgenBITNd GWxzZ0YPhCf/2wPxd2zaGEnWXZtF6TJqS4JuRNaDgN3fzvZztaRxDtH+WySkqgZZUOn3 5dLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=8ng9gy3uIZvS//RgZ+CHX/EAvaaCMLs291uDhJHyk18=; b=yuP9szATFSM70JfSgsX8tEV0tOHWg0TFwUxjGx0urA1wFUo/JeCo76UAQDhotmtJ7F B4fcB3TOCc5mWJz3miUDWAkx9whZ7MyNChGquBCtz27KuL9HXPDTZ6NEQhWKKYjXD9F0 b3PG8cvOJJ7j5++EMo3P8a3PMR74NSe62wFtGXavxKtbeakoX1AgNFJQ64yfV8bJiU9C nxvQWNUzwSHpTamhUW8w+e0NYzuTLvTEpbb2MEmzO6X8iq+wIkkXkubAZzy1J+H1e+Gs 4z5F0NeRaJhW5KUpzg4eoMKhkBQxlsMEAmIP3QGisaA4SoMNbYZrrVKHevqe2HUJutGt OEwg== ARC-Authentication-Results: i=1; mx.google.com; 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 m12si4854534eds.420.2021.06.04.09.13.27; Fri, 04 Jun 2021 09:13:51 -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; 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 S229822AbhFDQOC convert rfc822-to-8bit (ORCPT + 99 others); Fri, 4 Jun 2021 12:14:02 -0400 Received: from us-smtp-delivery-44.mimecast.com ([205.139.111.44]:37709 "EHLO us-smtp-delivery-44.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229924AbhFDQOB (ORCPT ); Fri, 4 Jun 2021 12:14:01 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-352-CmAo95vYMZKnalAqwwVMqA-1; Fri, 04 Jun 2021 12:12:11 -0400 X-MC-Unique: CmAo95vYMZKnalAqwwVMqA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2DD5D180FD6F; Fri, 4 Jun 2021 16:12:09 +0000 (UTC) Received: from bahia.lan (ovpn-112-232.ams2.redhat.com [10.36.112.232]) by smtp.corp.redhat.com (Postfix) with ESMTP id E038F60CEC; Fri, 4 Jun 2021 16:11:57 +0000 (UTC) From: Greg Kurz To: Miklos Szeredi Cc: linux-kernel@vger.kernel.org, Max Reitz , linux-fsdevel@vger.kernel.org, virtio-fs@redhat.com, Vivek Goyal , Greg Kurz Subject: [PATCH v2 0/7] fuse: Some fixes for submounts Date: Fri, 4 Jun 2021 18:11:49 +0200 Message-Id: <20210604161156.408496-1-groug@kaod.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=groug@kaod.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: kaod.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v2: - add an extra fix (patch 2) : mount is now added to the list before unlocking sb->s_umount - set SB_BORN just before unlocking sb->s_umount, just like it would happen when using fc_mount() (Max) - don't allocate a FUSE context for the submounts (Max) - introduce a dedicated context ops for submounts - add a extra cleanup : simplify the code even more with fc_mount() v1: While working on adding syncfs() support in FUSE, I've hit some severe bugs with submounts (a crash and an infinite loop). The fix for the crash is straightforward (patch 1), but the fix for the infinite loop is more invasive : as suggested by Miklos, a simple bug fix is applied first (patch 2) and the final fix (patch 3) is applied on top. Greg Kurz (7): fuse: Fix crash in fuse_dentry_automount() error path fuse: Fix crash if superblock of submount gets killed early fuse: Fix infinite loop in sget_fc() fuse: Add dedicated filesystem context ops for submounts fuse: Call vfs_get_tree() for submounts fuse: Switch to fc_mount() for submounts fuse: Make fuse_fill_super_submount() static fs/fuse/dir.c | 58 ++++++--------------------------------------- fs/fuse/fuse_i.h | 14 ++++------- fs/fuse/inode.c | 56 +++++++++++++++++++++++++++++++++++++++++-- fs/fuse/virtio_fs.c | 3 +++ 4 files changed, 69 insertions(+), 62 deletions(-) -- 2.31.1