Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F166829767
D6927.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
819 B
Referenced Files
None
Subscribers
None
D6927.diff
View Options
Index: head/sys/kern/uipc_shm.c
===================================================================
--- head/sys/kern/uipc_shm.c
+++ head/sys/kern/uipc_shm.c
@@ -295,14 +295,14 @@
int error;
shmfd = fp->f_data;
- foffset_lock_uio(fp, uio, flags);
- rl_cookie = rangelock_rlock(&shmfd->shm_rl, uio->uio_offset,
- uio->uio_offset + uio->uio_resid, &shmfd->shm_mtx);
#ifdef MAC
error = mac_posixshm_check_read(active_cred, fp->f_cred, shmfd);
if (error)
return (error);
#endif
+ foffset_lock_uio(fp, uio, flags);
+ rl_cookie = rangelock_rlock(&shmfd->shm_rl, uio->uio_offset,
+ uio->uio_offset + uio->uio_resid, &shmfd->shm_mtx);
error = uiomove_object(shmfd->shm_object, shmfd->shm_size, uio);
rangelock_unlock(&shmfd->shm_rl, rl_cookie, &shmfd->shm_mtx);
foffset_unlock_uio(fp, uio, flags);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 17, 9:43 PM (23 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36853430
Default Alt Text
D6927.diff (819 B)
Attached To
Mode
D6927: posixshm: Fix lock leak when mac_posixshm_check_read rejects read.
Attached
Detach File
Event Timeline
Log In to Comment