Page MenuHomeFreeBSD

Ensure that automount(8) flushes autofs by checking fsid
ClosedPublic

Authored by kib on Sep 29 2023, 6:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 21, 4:05 AM
Unknown Object (File)
Tue, May 21, 4:05 AM
Unknown Object (File)
Tue, May 21, 4:05 AM
Unknown Object (File)
Apr 26 2024, 1:52 AM
Unknown Object (File)
Apr 20 2024, 9:10 PM
Unknown Object (File)
Apr 20 2024, 4:23 PM
Unknown Object (File)
Mar 12 2024, 10:23 PM
Unknown Object (File)
Mar 12 2024, 8:42 PM
Subscribers

Details

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks fine to me. I don't know enough about
autofs to say if it will fix the problem.

Hopefully the original reporter can test this
patch and confirm that it fixes the problem
for them?

sys/kern/vfs_mount.c
1390

this is open-coded fsidcmp

kib marked an inline comment as done.

Use fsidcmp()

This revision is now accepted and ready to land.Oct 3 2023, 9:19 PM

The additional check of the fstype in automount.c got lost in this patch; without it, you get a lot of unnecessary errors (since it will log_err for each covered mountpoint)

This revision now requires changes to proceed.Oct 3 2023, 10:53 PM

The additional check of the fstype in automount.c got lost in this patch; without it, you get a lot of unnecessary errors (since it will log_err for each covered mountpoint)

Do you mean your patch from D40961 for automount.c? If yes, please send me it as git-formatted patch by mail, with all metadata and perhaps 'Differential revision: https://reviews.freebsd.org/D40961' tag. It is your change.

Include relevant chunk from D40961

fsid for MNT_UPDATE call should be taken from the last statfs, I believe

In D42023#959423, @kib wrote:

fsid for MNT_UPDATE call should be taken from the last statfs, I believe

I don't know of any legitimate case where one autofs would be mounted directly over another one, so it should not matter much; using the last statfs is probably cleanest.

I will test this version shortly.

This revision is now accepted and ready to land.Oct 17 2023, 2:03 PM

I'm not sure what exactly happened here, but I suspect there was something wrong with testing it: while one of previous Kib's commits fixed the instapanic on "automount -c", it still doesn't work, see last few entries at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274992.

Yeah, something's still wrong, looking into it.

sys/kern/vfs_mount.c
1390

Surely this is misusing fsidcmp? the first arg should be fsid_up, not the address of fsid_up which is a pointer.

sys/kern/vfs_mount.c
1390

Did it helped? Should I just go ahead with the change alone anyway?

It appears to be working correctly now. Thank you all :)