[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230906170856.GA800259@ZenIV>
Date: Wed, 6 Sep 2023 18:08:56 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Mikulas Patocka <mpatocka@...hat.com>
Cc: Christian Brauner <brauner@...nel.org>,
Zdenek Kabelac <zkabelac@...hat.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
dm-devel@...hat.com, Jan Kara <jack@...e.cz>,
Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] fix writing to the filesystem after unmount
On Wed, Sep 06, 2023 at 05:03:34PM +0200, Mikulas Patocka wrote:
> > IOW, you'd also hang on any umount of a bind-mount. IOW, every
> > single container making use of this filesystems via bind-mounts would
> > hang on umount and shutdown.
>
> bind-mount doesn't modify "s->s_writers.frozen", so the patch does nothing
> in this case. I tried unmounting bind-mounts and there was no deadlock.
You are making *any* mount destruction hang if the sucker is frozen.
Which includes the things like exit(2) of the last process within
a namespace, etc.
And it does include the things like mount --bind /usr/bin/gcc /tmp/cc; umount /tmp/cc
if /usr happened to be frozen at the moment.
This is really not an option.
> BTW. what do you think that unmount of a frozen filesystem should properly
> do? Fail with -EBUSY? Or, unfreeze the filesystem and unmount it? Or
> something else?
It's not just umount(2). It's exit(2). And close(2). And AF_UNIX garbage
collector taking out an undeliverable SCM_RIGHTS datagram that happens to
contain a reference to the last opened file on lazy-umounted fs, etc.
Powered by blists - more mailing lists