Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103253398
D28401.id.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
D28401.id.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
@@ -91,14 +91,10 @@
struct tmpfs_mount *tm;
int error;
+ /* Caller assumes responsibility for ensuring access (VEXEC). */
dnode = VP_TO_TMPFS_DIR(dvp);
*vpp = NULLVP;
- /* Check accessibility of requested node as a first step. */
- error = vn_dir_check_exec(dvp, cnp);
- if (error != 0)
- goto out;
-
/* We cannot be requesting the parent directory of the root node. */
MPASS(IMPLIES(dnode->tn_type == VDIR &&
dnode->tn_dir.tn_parent == dnode,
@@ -241,8 +237,17 @@
static int
tmpfs_lookup(struct vop_lookup_args *v)
{
+ struct vnode *dvp = v->a_dvp;
+ struct vnode **vpp = v->a_vpp;
+ struct componentname *cnp = v->a_cnp;
+ int error;
- return (tmpfs_lookup1(v->a_dvp, v->a_vpp, v->a_cnp));
+ /* Check accessibility of requested node as a first step. */
+ error = vn_dir_check_exec(dvp, cnp);
+ if (error != 0)
+ return (error);
+
+ return (tmpfs_lookup1(dvp, vpp, cnp));
}
static int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 4:21 PM (14 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14805666
Default Alt Text
D28401.id.diff (1 KB)
Attached To
Mode
D28401: tmpfs: push VEXEC check into tmpfs_lookup()
Attached
Detach File
Event Timeline
Log In to Comment