Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109860413
D38051.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
741 B
Referenced Files
None
Subscribers
None
D38051.diff
View Options
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
@@ -1029,6 +1029,15 @@
}
}
+ /*
+ * Avoid manipulating '.' and '..' entries.
+ */
+ if ((fcnp->cn_flags & ISDOTDOT) != 0 ||
+ (fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.')) {
+ error = EINVAL;
+ goto out_locked;
+ }
+
if (tvp != NULL)
vn_seqc_write_begin(tvp);
vn_seqc_write_begin(tdvp);
@@ -1044,8 +1053,7 @@
de = tmpfs_dir_lookup(fdnode, fnode, fcnp);
/*
- * Entry can disappear before we lock fdvp,
- * also avoid manipulating '.' and '..' entries.
+ * Entry can disappear before we lock fdvp.
*/
if (de == NULL) {
if ((fcnp->cn_flags & ISDOTDOT) != 0 ||
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 11, 11:08 AM (12 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16593967
Default Alt Text
D38051.diff (741 B)
Attached To
Mode
D38051: [tmpfs]: Fix misc issues reproduced by pjdfstest
Attached
Detach File
Event Timeline
Log In to Comment