Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Sep 2009 10:25:33 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r197151 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <200909131025.n8DAPXBA013694@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Sun Sep 13 10:25:33 2009
New Revision: 197151
URL: http://svn.freebsd.org/changeset/base/197151

Log:
  Be sure not to overflow struct fid.
  
  MFC after:	3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Sun Sep 13 10:12:29 2009	(r197150)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Sun Sep 13 10:25:33 2009	(r197151)
@@ -1149,6 +1149,8 @@ zfs_checkexp(vfs_t *vfsp, struct sockadd
 	    credanonp, numsecflavors, secflavors));
 }
 
+CTASSERT(SHORT_FID_LEN <= sizeof(struct fid));
+CTASSERT(LONG_FID_LEN <= sizeof(struct fid));
 
 static int
 zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp)



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