Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164840000
D27513.id80445.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
539 B
Referenced Files
None
Subscribers
None
D27513.id80445.diff
View Options
Index: sys/kern/kern_descrip.c
===================================================================
--- sys/kern/kern_descrip.c
+++ sys/kern/kern_descrip.c
@@ -2463,6 +2463,13 @@
struct file *fp;
int i, lastfile;
+ KASSERT(refcount_load(fdp->fd_refcount) == 0,
+ ("%s: fd table %p carries references", __func__, fdp));
+
+ /* Serialize with threads iterating over the table. */
+ FILEDESC_XLOCK(fdp);
+ FILEDESC_XUNLOCK(fdp);
+
lastfile = fdlastfile_single(fdp);
for (i = 0; i <= lastfile; i++) {
fde = &fdp->fd_ofiles[i];
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 5, 6:59 AM (13 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36010075
Default Alt Text
D27513.id80445.diff (539 B)
Attached To
Mode
D27513: fd: Plug a race between fd table free and several loops
Attached
Detach File
Event Timeline
Log In to Comment