Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Mar 2014 10:23:51 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r263079 - head/sys/kern
Message-ID:  <201403121023.s2CANpqq016895@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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);
 }
 



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