Page MenuHomeFreeBSD

D20800.diff
No OneTemporary

D20800.diff

Index: head/sys/kern/kern_descrip.c
===================================================================
--- head/sys/kern/kern_descrip.c
+++ head/sys/kern/kern_descrip.c
@@ -2761,6 +2761,7 @@
if (maxprotp != NULL)
*maxprotp = VM_PROT_ALL;
#else
+ cap_rights_t fdrights;
struct filedesc *fdp = td->td_proc->p_fd;
seqc_t seq;
@@ -2769,15 +2770,18 @@
error = _fget(td, fd, fpp, 0, rightsp, &seq);
if (error != 0)
return (error);
- /*
- * If requested, convert capability rights to access flags.
- */
if (maxprotp != NULL)
- *maxprotp = cap_rights_to_vmprot(cap_rights(fdp, fd));
+ fdrights = *cap_rights(fdp, fd);
if (!fd_modified(fdp, fd, seq))
break;
fdrop(*fpp, td);
}
+
+ /*
+ * If requested, convert capability rights to access flags.
+ */
+ if (maxprotp != NULL)
+ *maxprotp = cap_rights_to_vmprot(&fdrights);
#endif
return (error);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 11, 6:48 PM (20 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15756810
Default Alt Text
D20800.diff (891 B)

Event Timeline