Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 May 2000 19:11:26 GMT
From:      mellon@pobox.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/18503: 
Message-ID:  <200005111911.TAA25719@happy.checkpoint.com>

next in thread | raw e-mail | index | archive | help

>Number:         18503
>Category:       kern
>Synopsis:       
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 11 09:20:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Anatoly Vorobey
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:

5.0-CURRENT

>Description:

Current code of mount() in vfs_syscalls.c does not check,
erroneously, for error return from vfs_allocate_syncvnode().
The failure scenario is very unlikely to happen, however
(it'll only fail if it can't obtain a vnode). The attached
fix will prudently refrain from ignoring the return value.

>How-To-Repeat:



>Fix:

Index: vfs_syscalls.c
===================================================================
RCS file: /freebsd/cvs/src/sys/kern/vfs_syscalls.c,v
retrieving revision 1.153
diff -u -r1.153 vfs_syscalls.c
--- vfs_syscalls.c	2000/05/05 09:58:27	1.153
+++ vfs_syscalls.c	2000/05/11 19:07:57
@@ -342,7 +342,7 @@
 		if ((mp->mnt_flag & MNT_RDONLY) == 0)
 			error = vfs_allocate_syncvnode(mp);
 		vfs_unbusy(mp, p);
-		if ((error = VFS_START(mp, 0, p)) != 0)
+		if (error || (error = VFS_START(mp, 0, p)) != 0)
 			vrele(vp);
 	} else {
 		simple_lock(&vp->v_interlock);

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005111911.TAA25719>