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)
Wed, Oct 23, 4:58 AM
Unknown Object (File)
Wed, Oct 23, 4:58 AM
Unknown Object (File)
Wed, Oct 23, 4:57 AM
Unknown Object (File)
Wed, Oct 23, 4:57 AM
Unknown Object (File)
Wed, Oct 23, 4:57 AM
Unknown Object (File)
Wed, Oct 23, 4:57 AM
Unknown Object (File)
Wed, Oct 23, 4:42 AM
Unknown Object (File)
Fri, Oct 18, 5:51 AM
Subscribers

Details

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

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 :)