Page MenuHomeFreeBSD

D27513.id80445.diff
No OneTemporary

D27513.id80445.diff

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

Mime Type
text/plain
Expires
Sun, Apr 26, 1:28 PM (12 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32186115
Default Alt Text
D27513.id80445.diff (539 B)

Event Timeline