mirror of
https://github.com/opnsense/src.git
synced 2026-04-23 07:07:24 -04:00
was still possible to open for write from the lower filesystem. There is a symmetric situation where the binary could already has file descriptors opened for write, but it can be executed from the nullfs overlay. Handle the issue by passing one v_writecount reference to the lower vnode if nullfs vnode has non-zero v_writecount. Note that only one write reference can be donated, since nullfs only keeps one use reference on the lower vnode. Always use the lower vnode v_writecount for the checks. Introduce the VOP_GET_WRITECOUNT to read v_writecount, which is currently always bypassed to the lower vnode, and VOP_ADD_WRITECOUNT to manipulate the v_writecount value, which manages a single bypass reference to the lower vnode. Caling the VOPs instead of directly accessing v_writecount provide the fix described in the previous paragraph. Tested by: pho MFC after: 3 weeks |
||
|---|---|---|
| .. | ||
| cd9660 | ||
| coda | ||
| deadfs | ||
| devfs | ||
| ext2fs | ||
| fdescfs | ||
| fifofs | ||
| fuse | ||
| hpfs | ||
| msdosfs | ||
| nandfs | ||
| nfs | ||
| nfsclient | ||
| nfsserver | ||
| ntfs | ||
| nullfs | ||
| nwfs | ||
| portalfs | ||
| procfs | ||
| pseudofs | ||
| smbfs | ||
| tmpfs | ||
| udf | ||
| unionfs | ||