Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147827228
D23883.id68964.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
783 B
Referenced Files
None
Subscribers
None
D23883.id68964.diff
View Options
Index: sys/kern/kern_descrip.c
===================================================================
--- sys/kern/kern_descrip.c
+++ sys/kern/kern_descrip.c
@@ -3028,13 +3028,11 @@
fgetvp_rights(struct thread *td, int fd, cap_rights_t *needrightsp,
struct filecaps *havecaps, struct vnode **vpp)
{
- struct filedesc *fdp;
struct filecaps caps;
struct file *fp;
int error;
- fdp = td->td_proc->p_fd;
- error = fget_cap_locked(fdp, fd, needrightsp, &fp, &caps);
+ error = fget_cap(td, fd, needrightsp, &fp, &caps);
if (error != 0)
return (error);
if (fp->f_ops == &badfileops) {
@@ -3049,10 +3047,12 @@
*havecaps = caps;
*vpp = fp->f_vnode;
vrefact(*vpp);
+ fdrop(fp, td);
return (0);
out:
filecaps_free(&caps);
+ fdrop(fp, td);
return (error);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 14, 11:36 PM (6 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29692537
Default Alt Text
D23883.id68964.diff (783 B)
Attached To
Mode
D23883: (pwd 1/3) fd: make fgetvp_rights work without the filedesc lock
Attached
Detach File
Event Timeline
Log In to Comment