bin/99873: mountd reload fails

Danny Braniss danny at
Fri Jul 7 08:20:15 UTC 2006

>Number:         99873
>Category:       bin
>Synopsis:       mountd reload fails
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 07 08:20:13 GMT 2006
>Originator:     Danny Braniss
>Release:        FreeBSD 6.1-STABLE
System: FreeBSD bsd 6.1-STABLE FreeBSD 6.1-STABLE #6: Fri Jun 16 12:50:38 IDT 2006 danny at bsd:/r+d/obj/bsd/r+d/6.1/src/sys/HUJI amd64

	in get_exportlist():
	The loop to un-export all exported file systems does not
	increment the fsp pointer when continue is called, thus
	not realy unexporting all files, causing problems when
	updating. This uncovered another problem, with the very
	first if(..) in the loop.
	the problem appears when you have a nfs mounted file system
	preferably before local file systems, hence on a nfs-root
	it's immediately noticed.
	type '/etc/rc.d/mountd reload' and see your local exported
	files/filesystems unexported.
	one suggestion:

--- /r+d/6.1/src/usr.sbin/mountd/mountd.c       Fri Jun 16 09:42:42 2006
+++ ./mountd.c  Fri Jul  7 11:03:40 2006
@@ -1012,7 +1012,7 @@
                build_iovec(&iov, &iovlen, "export", &export, sizeof(export));
-       for (i = 0; i < num; i++) {
+       for (i = 0; i < num; i++, fsp++) {
                if (getvfsbyname(fsp->f_fstypename, &vfc) != 0) {
                        syslog(LOG_ERR, "getvfsbyname() failed for %s",
@@ -1049,7 +1049,6 @@
                            "can't delete exports for %s: %m",
-               fsp++;
        if (iov != NULL) {

More information about the freebsd-bugs mailing list