Page MenuHomeFreeBSD

Disallow fcntl(F_READAHEAD) when the vnode is not a regular file.
ClosedPublic

Authored by markj on Oct 1 2019, 8:19 PM.
Tags
None
Referenced Files
F106064462: D21864.diff
Tue, Dec 24, 7:12 PM
Unknown Object (File)
Thu, Dec 19, 5:18 PM
Unknown Object (File)
Nov 20 2024, 5:54 PM
Unknown Object (File)
Sep 4 2024, 7:50 PM
Unknown Object (File)
Aug 31 2024, 8:16 PM
Unknown Object (File)
Aug 19 2024, 10:15 PM
Unknown Object (File)
Aug 19 2024, 8:59 AM
Unknown Object (File)
Aug 19 2024, 8:32 AM
Subscribers

Details

Summary

f_iosize is 0 for devfs vnodes, resulting in a divide by zero if one
calls, for example, fcntl(STDIN_FILENO, F_READAHEAD, 4096).

The sequential heuristic is not applied to I/O to or from device files,
and posix_fadvise(2) returns an error for v_type != VREG, so do the same
here too.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26818
Build 25152: arc lint + arc unit