From owner-freebsd-bugs@FreeBSD.ORG Fri Jul 7 08:20:15 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3275516A4DF for ; Fri, 7 Jul 2006 08:20:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2918043D49 for ; Fri, 7 Jul 2006 08:20:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k678KEoW064776 for ; Fri, 7 Jul 2006 08:20:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k678KDdi064770; Fri, 7 Jul 2006 08:20:13 GMT (envelope-from gnats) Resent-Date: Fri, 7 Jul 2006 08:20:13 GMT Resent-Message-Id: <200607070820.k678KDdi064770@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Danny Braniss Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 369D316A4DA for ; Fri, 7 Jul 2006 08:18:37 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A023743D5A for ; Fri, 7 Jul 2006 08:18:36 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from bsd.cs.huji.ac.il ([132.65.16.112]) by cs1.cs.huji.ac.il with esmtp id 1FylXn-000BCt-1A for FreeBSD-gnats-submit@freebsd.org; Fri, 07 Jul 2006 11:18:35 +0300 Received: from danny by bsd.cs.huji.ac.il with local (Exim 4.60) (envelope-from ) id 1FylXm-000Dfo-VU for FreeBSD-gnats-submit@freebsd.org; Fri, 07 Jul 2006 11:18:34 +0300 Message-Id: Date: Fri, 07 Jul 2006 11:18:34 +0300 From: Danny Braniss To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/99873: mountd reload fails X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Danny Braniss List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2006 08:20:15 -0000 >Number: 99873 >Category: bin >Synopsis: mountd reload fails >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 07 08:20:13 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Danny Braniss >Release: FreeBSD 6.1-STABLE >Organization: >Environment: System: FreeBSD bsd 6.1-STABLE FreeBSD 6.1-STABLE #6: Fri Jun 16 12:50:38 IDT 2006 danny@bsd:/r+d/obj/bsd/r+d/6.1/src/sys/HUJI amd64 >Description: /usr/src/usr.sbin/mountd/mountd.c 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. >How-To-Repeat: 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. >Fix: 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", fsp->f_fstypename); @@ -1049,7 +1049,6 @@ "can't delete exports for %s: %m", fsp->f_mntonname); } - fsp++; } if (iov != NULL) { >Release-Note: >Audit-Trail: >Unformatted: