Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jul 2009 12:56:29 GMT
From:      Zhao Shuai <zhaoshuai@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 165748 for review
Message-ID:  <200907071256.n67CuTKe052997@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=165748

Change 165748 by zhaoshuai@zhaoshuai on 2009/07/07 12:55:30

	comment on pipe_stat()

Affected files ...

.. //depot/projects/soc2009/fifo/sys/fs/fifofs/fifo_vnops.c#19 edit
.. //depot/projects/soc2009/fifo/sys/kern/sys_pipe.c#17 edit

Differences ...

==== //depot/projects/soc2009/fifo/sys/fs/fifofs/fifo_vnops.c#19 (text+ko) ====

@@ -613,6 +613,7 @@
 	error = pipe_stat(fip->fi_rpipe, sb, cred, td);
 	if (error)
 		return (error);
+	/* pipe_stat zeros all fields of *ub, following assignment should be done after it */
 	sb->st_uid = fp->f_cred->cr_uid;
 	sb->st_gid = fp->f_cred->cr_gid;
 	return (0);

==== //depot/projects/soc2009/fifo/sys/kern/sys_pipe.c#17 (text+ko) ====

@@ -194,6 +194,7 @@
 	error = pipe_stat(pipe, ub, active_cred, td);
 	if (error)
 		return (error);
+	/* pipe_stat zeros all fields of *ub, following assignment should be done after it */
 	ub->st_uid = fp->f_cred->cr_uid;
 	ub->st_gid = fp->f_cred->cr_gid;
 	return (0);



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