svn commit: r263079 - head/sys/kern

Konstantin Belousov kib at FreeBSD.org
Wed Mar 12 10:23:52 UTC 2014


Author: kib
Date: Wed Mar 12 10:23:51 2014
New Revision: 263079
URL: http://svnweb.freebsd.org/changeset/base/263079

Log:
  The auio structure is only initialized when the vnode is symlink,
  avoid reading from it otherwise.
  
  Submitted by:	Conrad Meyer <cemeyer at uw.edu>
  MFC after:	1 week

Modified:
  head/sys/kern/vfs_syscalls.c

Modified: head/sys/kern/vfs_syscalls.c
==============================================================================
--- head/sys/kern/vfs_syscalls.c	Wed Mar 12 09:08:51 2014	(r263078)
+++ head/sys/kern/vfs_syscalls.c	Wed Mar 12 10:23:51 2014	(r263079)
@@ -2553,9 +2553,9 @@ kern_readlinkat(struct thread *td, int f
 		auio.uio_td = td;
 		auio.uio_resid = count;
 		error = VOP_READLINK(vp, &auio, td->td_ucred);
+		td->td_retval[0] = count - auio.uio_resid;
 	}
 	vput(vp);
-	td->td_retval[0] = count - auio.uio_resid;
 	return (error);
 }
 


More information about the svn-src-all mailing list