Page MenuHomeFreeBSD

mbuf: Don't force all M_EXTPG mbufs to be read-only
ClosedPublic

Authored by jhb on Sep 25 2024, 3:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 8, 9:36 AM
Unknown Object (File)
Sun, Feb 8, 4:48 AM
Unknown Object (File)
Sat, Feb 7, 5:30 AM
Unknown Object (File)
Sun, Feb 1, 10:42 AM
Unknown Object (File)
Sat, Jan 31, 3:38 PM
Unknown Object (File)
Sat, Jan 31, 8:21 AM
Unknown Object (File)
Thu, Jan 29, 10:25 AM
Unknown Object (File)
Jan 5 2026, 12:09 AM
Subscribers

Details

Summary

Some M_EXTPG mbufs are read-only (e.g. those backing sendfile
requests), but others are not. Add a flags argument to
mb_alloc_ext_pgs that can be used to set M_RDONLY when needed rather
than setting it unconditionally. Update mb_unmapped_to_ext to
preserve M_RDONLY from the unmapped mbuf.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable