Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5614905ybi; Tue, 28 May 2019 16:26:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyG0knyfYLov2KhLi+rO50b7jmzAXGP8c6tzW74SY0eAVQgHBV+dPH8Zw3enf0Kj6aKsXpi X-Received: by 2002:a17:902:6bc4:: with SMTP id m4mr62121782plt.266.1559085977230; Tue, 28 May 2019 16:26:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559085977; cv=none; d=google.com; s=arc-20160816; b=wgK2c4vASDlgBjV1S3EUZMMsx8LfDeKHdivF29GdxJJZjK47rRyfiCSIH+TExy/2r5 HVMiDp8ac21OtRBt1HHHXfy3a/y5RDtPirk2yRkSlaj5LDvJw00ieZl6sOTMIxxqTWTJ rQ9yjFTMl4mwuUTjwlWvgqJlmuQtVJsOEt+vS0yFAekUGNxYpHF4XKdjcjeejvg08iGQ JdieggqIdcTYqbjEL/6AAd+0bD/JAK4JZC49RzV+h/IZlKsdnV8nuC1Z2Xts97N8CfAR ij1BPP3D6DPKo+gz3uYXPpodX749dF/BiMV30xmaOxp3+Qc5Ee/iAECmQD+uP3U1bns2 FGxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=HGPN9OjlN0u2vkYT7lUEXn5/y2a9ZsC+Dfozs38xwo0=; b=tYcHvvMFiBmrA7yzVwixsQbmUX8Fxuwgf5Mv+ow7ahrfHG8GgrN/wuPrlk4TgqBh/Z rDp5B3NE5yG2THzf0SiQCKc1Xmb236bdDoCyWEnTDlESys68m6VOTo55GGvu3cifOXaK fKLlQgyyNZGBkJWSBgO79Tq7Q8Dvc9WQTLZJ0FbpWVVUdQzw+ZGWtCDtUb/F1Ttfp2Ng UvNf2WM4hgaaJ+PEjhOeqfg6yXrHIvT1ty30kz5ec6rgX3qYxUNq3DlB0eBBe0yOdyPS nxguY7ez123OmS1vjkLdp4d5jClECXFNNr7ynVCWYa5OX36S8twiQLxVoMRX6G+nVn+T qUOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ot3EWkd2; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 205si25877294pgb.424.2019.05.28.16.26.01; Tue, 28 May 2019 16:26:17 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=Ot3EWkd2; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727089AbfE1XYF (ORCPT + 99 others); Tue, 28 May 2019 19:24:05 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:45846 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726943AbfE1XYE (ORCPT ); Tue, 28 May 2019 19:24:04 -0400 Received: by mail-ot1-f65.google.com with SMTP id t24so135834otl.12 for ; Tue, 28 May 2019 16:24:03 -0700 (PDT) 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 :cc; bh=HGPN9OjlN0u2vkYT7lUEXn5/y2a9ZsC+Dfozs38xwo0=; b=Ot3EWkd25DfNtyqQZi2lKoCMywsWj1GEkyVsamx8IhpKmMYoQlNVtFXDsN5kzZ6ztV G0G4l+Yn9BT/91zveLip+MqoiQ9WY7KdLEeUnxKqsGaf/8a6P6TCdXsDzggmJbd8BC7j j7g/1ER+6QZ5ydhZ3Bf+DMekuCVU7XQ2krnuSQI+4HCJgoVYtDwKLQjR3UkiqRBl2ZBC Hbgfr4g8WcFCgwSmqfiyN+oPogiE52ZKR9MwXWkiESYTJsOEtnnzFKKAjkloisXxqBPE +CTyleolaoiiIlj62zgtnI49WL88oeZM7ei1tnil/DaLguKbl4ERfII14rmEY0DmU5Lo 55/w== 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=HGPN9OjlN0u2vkYT7lUEXn5/y2a9ZsC+Dfozs38xwo0=; b=BYQPlaW8tBSYTY+bsUWEFCGBvy2qZWUjcxkHlopOqx8rFD+Nj0snEQvCmQf6nFRcYa yk97cneq1UXVRy2tm7GO6mZd2LEFl0IH0xfovgxNmjN6OMmmmEzbT3p2eRRiKM49WRSU vGHKvak6vBaNJOQHaHrADy9tn9ZdlaDz7GgoENoBKM4whHDtqLLwmZlWa2zgb38L5f10 hZ5VwvJ21vHIuruBnYAjgcTsxifS1XebxKZGwHKIMGPDJEfUshyrELGcBgNunZ6qeXsZ eku4zYHFO9RRW1gLlFkWPlK4oPh1JMX6erMNNpyZJO9grY/BXEqYf+qJ5+lx08ry8rnK gYqw== X-Gm-Message-State: APjAAAXSixCpGjJO7xbdy7u+7y5gHZrvCnD1PrJnJ/19h7Gn6BnGWldN PCDDh1EdLL//I9CRMAsWcawmjOzagJFuypDpgUUSEw== X-Received: by 2002:a9d:7f8b:: with SMTP id t11mr5793otp.110.1559085842981; Tue, 28 May 2019 16:24:02 -0700 (PDT) MIME-Version: 1.0 References: <155905930702.7587.7100265859075976147.stgit@warthog.procyon.org.uk> <155905933492.7587.6968545866041839538.stgit@warthog.procyon.org.uk> <10418.1559084686@warthog.procyon.org.uk> In-Reply-To: <10418.1559084686@warthog.procyon.org.uk> From: Jann Horn Date: Wed, 29 May 2019 01:23:36 +0200 Message-ID: Subject: Re: [PATCH 3/7] vfs: Add a mount-notification facility To: David Howells Cc: Al Viro , raven@themaw.net, linux-fsdevel , Linux API , linux-block@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module , kernel list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 29, 2019 at 1:04 AM David Howells wrote: > Jann Horn wrote: > > It might make sense to redesign this stuff so that watches don't hold > > references on the object being watched. > > I explicitly made it hold a reference so that if you place a watch on an > automounted mount it stops it from expiring. > > Further, if I create a watch on something, *should* it be unmountable, just as > if I had a file open there or had chdir'd into there? I don't really know. I guess it depends on how it's being used? If someone decides to e.g. make a file browser that installs watches for a bunch of mountpoints for some fancy sidebar showing the device mounts on the system, or something like that, that probably shouldn't inhibit unmounting... I don't know if that's a realistic use case.