PERFORCE change 165748 for review

Zhao Shuai zhaoshuai at FreeBSD.org
Tue Jul 7 12:56:31 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=165748

Change 165748 by zhaoshuai at 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);


More information about the p4-projects mailing list