Re: [PATCH 2/2] autofs: dont trigger mount if it cant succeed
Christian Brauner <[email protected]> Wed, 12 Nov 2025 12:01:01 +0100
| Newsgroups | gmane.linux.file-systems,gmane.linux.kernel,gmane.linux.kernel.autofs |
|---|---|
| Message-ID | <20251112-kleckern-gebinde-d8dbe0d50e03@brauner> |
On Tue, Nov 11, 2025 at 08:27:42PM +0800, Ian Kent wrote: > On 11/11/25 18:55, Christian Brauner wrote: > > On Tue, Nov 11, 2025 at 10:24:35AM +0000, Al Viro wrote: > > > On Tue, Nov 11, 2025 at 11:19:59AM +0100, Christian Brauner wrote: > > > > > > > > + sbi->owner = current->nsproxy->mnt_ns; > > > > ns_ref_get() > > > > Can be called directly on the mount namespace. > > > ... and would leak all mounts in the mount tree, unless I'm missing > > > something subtle. > > Right, I thought you actually wanted to pin it. > > Anyway, you could take a passive reference but I think that's nonsense > > as well. The following should do it: > > Right, I'll need to think about this for a little while, I did think > > of using an id for the comparison but I diverged down the wrong path so > > this is a very welcome suggestion. There's still the handling of where > > the daemon goes away (crash or SIGKILL, yes people deliberately do this > > at times, think simulated disaster recovery) which I've missed in this Can you describe the problem in more detail and I'm happy to help you out here. I don't yet understand what the issue is.