Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147539151
D51956.1783701903.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
434 B
Referenced Files
None
Subscribers
None
D51956.1783701903.diff
View Options
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -2562,6 +2562,8 @@
}
error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED);
NDFREE_PNBUF(&nd);
+ KASSERT(error != 0 || VN_ISDEV(nd.ni_vp) || sbp->st_rdev == NODEV,
+ ("st_rdev should be NODEV unless the file is a device node"));
vput(nd.ni_vp);
#ifdef __STAT_TIME_T_EXT
sbp->st_atim_ext = 0;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 10, 4:45 PM (2 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29061894
Default Alt Text
D51956.1783701903.diff (434 B)
Attached To
Mode
D51956: vfs: Assert that st_rdev is NODEV for non-devices
Attached
Detach File
Event Timeline
Log In to Comment