Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108301693
D47936.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D47936.diff
View Options
diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c
--- a/sys/fs/msdosfs/msdosfs_vnops.c
+++ b/sys/fs/msdosfs/msdosfs_vnops.c
@@ -1962,6 +1962,8 @@
{
struct denode *dep;
struct defid *defhp;
+ _Static_assert(sizeof(struct defid) <= sizeof(struct fid),
+ "struct defid cannot be larger than struct fid");
dep = VTODE(ap->a_vp);
defhp = (struct defid *)ap->a_fhp;
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c
--- a/sys/fs/tmpfs/tmpfs_vnops.c
+++ b/sys/fs/tmpfs/tmpfs_vnops.c
@@ -1709,6 +1709,8 @@
struct tmpfs_fid_data tfd;
struct tmpfs_node *node;
struct fid *fhp;
+ _Static_assert(sizeof(struct tmpfs_fid_data) <= sizeof(struct fid),
+ "struct tmpfs_fid_data cannot be larger than struct fid");
node = VP_TO_TMPFS_NODE(ap->a_vp);
fhp = ap->a_fhp;
diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c
--- a/sys/fs/udf/udf_vnops.c
+++ b/sys/fs/udf/udf_vnops.c
@@ -1274,6 +1274,8 @@
{
struct udf_node *node;
struct ifid *ifhp;
+ _Static_assert(sizeof(struct ifid) <= sizeof(struct fid),
+ "struct ifid cannot be larger than struct fid");
node = VTON(a->a_vp);
ifhp = (struct ifid *)a->a_fhp;
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -1919,6 +1919,8 @@
{
struct inode *ip;
struct ufid *ufhp;
+ _Static_assert(sizeof(struct ufid) <= sizeof(struct fid),
+ "struct ufid cannot be larger than struct fid");
ip = VTOI(ap->a_vp);
ufhp = (struct ufid *)ap->a_fhp;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 24, 4:52 PM (19 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16092817
Default Alt Text
D47936.diff (1 KB)
Attached To
Mode
D47936: Add _Static_asserts to check that file system fid structures are not larger than struct fid
Attached
Detach File
Event Timeline
Log In to Comment