kern/61994: panic in linprocfs
Bjoern Groenvall
bg at sics.se
Tue Jan 27 09:42:30 PST 2004
>Number: 61994
>Category: kern
>Synopsis: panic in linprocfs
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Jan 27 09:40:12 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Bjoern Groenvall
>Release: FreeBSD 5.2-RELEASE i386
>Organization:
SICS
>Environment:
System: FreeBSD filur.sics.se 5.2-RELEASE FreeBSD 5.2-RELEASE #0: Thu Jan 22 22:47:09 CET 2004 root at filur.sics.se:/usr/src/sys/i386/compile/FILUR i386
>Description:
When linprocfs is synthesizing the mtab file it does not obey the
rules for proper locking.
>How-To-Repeat:
Mount a number of remote NFS file systems and then perform this
command a number of times.
# cat /compat/linux/proc/mtab
>Fix:
To synthesize the mtab file the following fields are used:
f_mntfromname, f_mntonname, f_fstypename, f_flags
All these fields are available without actually calling VFS_STATFS. If
one still insists on calling VFS_STATFS one should follow the locking
protocol.
--- /usr/src/sys/compat/linprocfs/linprocfs.c.orig Mon Oct 20 06:10:20 2003
+++ /usr/src/sys/compat/linprocfs/linprocfs.c Thu Jan 22 21:32:53 2004
@@ -364,9 +364,12 @@
mtx_lock(&mountlist_mtx);
error = 0;
TAILQ_FOREACH(mp, &mountlist, mnt_list) {
+#if 0
+ /* Needs proper locking but is also superfluous. */
error = VFS_STATFS(mp, &mp->mnt_stat, td);
if (error)
break;
+#endif
/* determine device name */
mntfrom = mp->mnt_stat.f_mntfromname;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list