svn commit: r263354 - stable/10/sys/kern

Konstantin Belousov kib at FreeBSD.org
Wed Mar 19 12:55:57 UTC 2014


Author: kib
Date: Wed Mar 19 12:55:57 2014
New Revision: 263354
URL: http://svnweb.freebsd.org/changeset/base/263354

Log:
  MFC r263079:
  The auio structure is only initialized when the vnode is symlink,
  avoid reading from it otherwise.

Modified:
  stable/10/sys/kern/vfs_syscalls.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/vfs_syscalls.c
==============================================================================
--- stable/10/sys/kern/vfs_syscalls.c	Wed Mar 19 12:52:49 2014	(r263353)
+++ stable/10/sys/kern/vfs_syscalls.c	Wed Mar 19 12:55:57 2014	(r263354)
@@ -2554,9 +2554,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