Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Apr 2005 11:51:21 +0900
From:      takawata@jp.freebsd.org
To:        jeff@freebsd.org, bp@freebsd.org
Cc:        freebsd-current@freebsd.org
Subject:   smbfs bug introduced at smbfs_vnops.c:1.58
Message-ID:  <200504100251.j3A2pLEH055107@sana.init-main.com>

next in thread | raw e-mail | index | archive | help
Hi I found the bug which is introduced at smbfs_vnops.c rev 1.58

This will make instant panic when you try to access
file on mounted smbfs.

This is caused by uninitialized vp.

Index: smbfs_vnops.c
===================================================================
RCS file: /home/ncvs/src/sys/fs/smbfs/smbfs_vnops.c,v
retrieving revision 1.59
diff -u -r1.59 smbfs_vnops.c
--- smbfs_vnops.c	29 Mar 2005 13:06:58 -0000	1.59
+++ smbfs_vnops.c	10 Apr 2005 02:44:04 -0000
@@ -1118,7 +1118,8 @@
 		return error;
 	if (error) {		/* name was found */
 		struct vattr vattr;
-
+		
+		vp = *vpp;
 		killit = 0;
 		error = VOP_GETATTR(vp, &vattr, cnp->cn_cred, td);
 		/*



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