Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F173471676
D60030.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
720 B
Referenced Files
None
Subscribers
None
D60030.diff
View Options
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c
--- a/sys/kern/sysv_shm.c
+++ b/sys/kern/sysv_shm.c
@@ -1304,13 +1304,11 @@
struct prison *pr = obj;
struct prison *rpr;
- SYSVSHM_LOCK();
prison_lock(pr);
rpr = osd_jail_get(pr, shm_prison_slot);
prison_unlock(pr);
if (rpr == pr)
shm_prison_cleanup(pr);
- SYSVSHM_UNLOCK();
return (0);
}
@@ -1320,6 +1318,7 @@
struct shmid_kernel *shmseg;
int i;
+ SYSVSHM_LOCK();
/* Remove any segments that belong to this jail. */
for (i = 0; i < shmalloced; i++) {
shmseg = &shmsegs[i];
@@ -1328,6 +1327,7 @@
shm_remove(shmseg, i);
}
}
+ SYSVSHM_UNLOCK();
}
SYSCTL_JAIL_PARAM_SYS_NODE(sysvshm, CTLFLAG_RW, "SYSV shared memory");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Sep 27, 4:48 AM (9 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39682536
Default Alt Text
D60030.diff (720 B)
Attached To
Mode
D60030: sysvshm: Fix locking in shm_prison_set()
Attached
Detach File
Event Timeline
Log In to Comment